|
From: Matthias S. <mat...@us...> - 2007-04-04 20:08:54
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5690 Modified Files: dimension.hpp Log Message: impl changes Index: dimension.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/dimension.hpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- dimension.hpp 16 Mar 2007 18:12:42 -0000 1.1.1.1 +++ dimension.hpp 4 Apr 2007 20:07:36 -0000 1.2 @@ -161,10 +161,21 @@ }; /// A utility class for defining fundamental dimensions. -template<class DT> -struct fundamental_dimension +//template<class DT> +//struct fundamental_dimension +//{ +// typedef typename make_dimension_list< boost::mpl::list< dim< DT,static_rational<1> > > >::type type; +//}; + +/// replacement for fundamental_dimension +template<long N> +struct base_dimension : + public mpl::int_<N> { - typedef typename make_dimension_list< boost::mpl::list< dim< DT,static_rational<1> > > >::type type; + typedef base_dimension<N> this_type; + typedef mpl::int_<N> value; + + typedef typename make_dimension_list< boost::mpl::list< dim< this_type,static_rational<1> > > >::type type; }; /// A utility class for defining composite dimensions with integer powers. @@ -176,7 +187,7 @@ class DT6 = dimensionless_type,int E6 = 0, class DT7 = dimensionless_type,int E7 = 0, class DT8 = dimensionless_type,int E8 = 0> -struct composite_dimension +struct derived_dimension { typedef typename make_dimension_list< boost::mpl::list< dim< DT1,static_rational<E1> >, |