[Dune] [Dune-Commit] dune-common r7037 - trunk/dune/common

Martin Nolte nolte at mathematik.uni-freiburg.de
Sat Oct 13 21:21:46 CEST 2012


Hi Oli,

I like your new solution. It's clean and we can deprecate the original 
implementation.

Since we are changing the implementation, I have a small suggestions (attached).

Best,

Martin

On 10/13/2012 09:11 PM, sander at dune-project.org wrote:
> Author: sander
> Date: 2012-10-13 21:11:40 +0200 (Sat, 13 Oct 2012)
> New Revision: 7037
>
> Modified:
>     trunk/dune/common/power.hh
> Log:
> Rename Power_m_p to StaticPower, which is a bit more telling, and conforms better to the Dune naming scheme
>
> Modified: trunk/dune/common/power.hh
> ===================================================================
> --- trunk/dune/common/power.hh	2012-10-13 19:09:45 UTC (rev 7036)
> +++ trunk/dune/common/power.hh	2012-10-13 19:11:40 UTC (rev 7037)
> @@ -16,15 +16,15 @@
>
>      //! Calculates m^p at compile time
>      template<int m, int p>
> -   struct Power_m_p
> +   struct StaticPower
>      {
>         /** \brief power stores m^p */
> -      enum { power = (m * Power_m_p<m,p-1>::power ) };
> +      enum { power = (m * StaticPower<m,p-1>::power ) };
>      };
>
>      //! end of recursion via specialization
>      template<int m>
> -   struct Power_m_p<  m , 0>
> +   struct StaticPower<  m , 0>
>      {
>         /** \brief m^0 = 1 */
>         enum { power = 1 };
>
>
> _______________________________________________
> Dune-Commit mailing list
> Dune-Commit at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-commit

-- 
Dr. Martin Nolte <nolte at mathematik.uni-freiburg.de>

Universität Freiburg                                   phone: +49-761-203-5630
Abteilung für angewandte Mathematik                    fax:   +49-761-203-5632
Hermann-Herder-Straße 10
79104 Freiburg, Germany
-------------- next part --------------
A non-text attachment was scrubbed...
Name: power.hh
Type: text/x-c++hdr
Size: 1840 bytes
Desc: not available
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20121013/b8d50b54/attachment.hh>


More information about the Dune mailing list