|
From: Matthias S. <mat...@us...> - 2007-04-04 19:14:45
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14993 Modified Files: physical_units.hpp Log Message: base dimension tags are now typedefs of base_dimension<N> class Index: physical_units.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/physical_units.hpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- physical_units.hpp 3 Apr 2007 21:38:26 -0000 1.8 +++ physical_units.hpp 4 Apr 2007 19:14:45 -0000 1.9 @@ -27,32 +27,66 @@ namespace units { +template<long N> +struct base_dimension : + public mpl::int_<N> +{ + typedef mpl::int_<N> value; +}; + /// tag representing length -struct length_tag : public ordinal<-9> { }; +typedef base_dimension<-9> length_tag; /// tag representing mass -struct mass_tag : public ordinal<-8> { }; +typedef base_dimension<-8> mass_tag; /// tag representing time -struct time_tag : public ordinal<-7> { }; +typedef base_dimension<-7> time_tag; /// tag representing electrical current -struct current_tag : public ordinal<-6> { }; +typedef base_dimension<-6> current_tag; /// tag representing temperature -struct temperature_tag : public ordinal<-5> { }; +typedef base_dimension<-5> temperature_tag; /// tag representing amount of substance -struct amount_tag : public ordinal<-4> { }; +typedef base_dimension<-4> amount_tag; -/// tag representing luminous intensity - demoted from status as a fundamental SI unit in 1979 -struct luminous_intensity_tag : public ordinal<-3> { }; +/// tag representing luminous intensity +typedef base_dimension<-3> luminous_intensity_tag; /// tag representing plane angle -struct plane_angle_tag : public ordinal<-2> { }; +typedef base_dimension<-2> plane_angle_tag; /// tag representing solid angle -struct solid_angle_tag : public ordinal<-1> { }; +typedef base_dimension<-1> solid_angle_tag; + +///// tag representing length +////struct length_tag : public ordinal<-9> { }; +// +///// tag representing mass +//struct mass_tag : public ordinal<-8> { }; +// +///// tag representing time +//struct time_tag : public ordinal<-7> { }; +// +///// tag representing electrical current +//struct current_tag : public ordinal<-6> { }; +// +///// tag representing temperature +//struct temperature_tag : public ordinal<-5> { }; +// +///// tag representing amount of substance +//struct amount_tag : public ordinal<-4> { }; +// +///// tag representing luminous intensity - demoted from status as a fundamental SI unit in 1979 +//struct luminous_intensity_tag : public ordinal<-3> { }; +// +///// tag representing plane angle +//struct plane_angle_tag : public ordinal<-2> { }; +// +///// tag representing solid angle +//struct solid_angle_tag : public ordinal<-1> { }; } |