You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(89) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(208) |
Feb
(76) |
Mar
(55) |
Apr
(74) |
May
(43) |
Jun
(116) |
Jul
(109) |
Aug
(46) |
Sep
(36) |
Oct
(106) |
Nov
(159) |
Dec
(128) |
| 2007 |
Jan
(54) |
Feb
(225) |
Mar
(200) |
Apr
(229) |
May
(7) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Matthias S. <mat...@us...> - 2007-04-13 05:46:04
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1994/boost/units Added Files: dimension_list.hpp Log Message: granular dimension_list header --- NEW FILE: dimension_list.hpp --- // mcs::units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2007 Matthias Christian Schabel // Copyright (C) 2007 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_DIMENSION_LIST_HPP #define BOOST_UNITS_DIMENSION_LIST_HPP #include <boost/mpl/next.hpp> #include <boost/units/config.hpp> namespace boost { namespace units { namespace detail { struct dimension_list_tag { }; } // namespace detail template<class Item, class Next> struct dimension_list { typedef detail::dimension_list_tag tag; typedef dimension_list type; typedef Item item; typedef Next next; typedef typename mpl::next<typename Next::size>::type size; }; } // namespace units } // namespace boost #if BOOST_UNITS_HAS_BOOST_TYPEOF #include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::dimension_list, 2) #endif #endif // BOOST_UNITS_DIMENSION_LIST_HPP |
|
From: Matthias S. <mat...@us...> - 2007-04-13 05:36:05
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30488/boost/units Added Files: derived_dimension.hpp Log Message: granular derived_dimension header --- NEW FILE: derived_dimension.hpp --- // mcs::units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2007 Matthias Christian Schabel // Copyright (C) 2007 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_DERIVED_DIMENSION_HPP #define BOOST_UNITS_DERIVED_DIMENSION_HPP //#include <boost/mpl/int.hpp> #include <boost/mpl/list.hpp> //#include <boost/units/dimensionless_type.hpp> #include <boost/units/static_rational.hpp> #include <boost/units/units_fwd.hpp> namespace boost { namespace units { /// A utility class for defining composite dimensions with integer powers. template<class DT1 = dimensionless_type,long E1 = 0, class DT2 = dimensionless_type,long E2 = 0, class DT3 = dimensionless_type,long E3 = 0, class DT4 = dimensionless_type,long E4 = 0, class DT5 = dimensionless_type,long E5 = 0, class DT6 = dimensionless_type,long E6 = 0, class DT7 = dimensionless_type,long E7 = 0, class DT8 = dimensionless_type,long E8 = 0> struct derived_dimension { typedef typename make_dimension_list< mpl::list< dim< DT1,static_rational<E1> >, dim< DT2,static_rational<E2> >, dim< DT3,static_rational<E3> >, dim< DT4,static_rational<E4> >, dim< DT5,static_rational<E5> >, dim< DT6,static_rational<E6> >, dim< DT7,static_rational<E7> >, dim< DT8,static_rational<E8> > > >::type type; }; } // namespace units } // namespace boost #endif // BOOST_UNITS_DERIVED_DIMENSION_HPP |
|
From: Matthias S. <mat...@us...> - 2007-04-13 05:28:33
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv27617/boost/units Added Files: dimensionless_type.hpp Log Message: granular dimensionless_type header --- NEW FILE: dimensionless_type.hpp --- // mcs::units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2007 Matthias Christian Schabel // Copyright (C) 2007 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_DIMENSIONLESS_TYPE_HPP #define BOOST_UNITS_DIMENSIONLESS_TYPE_HPP #include <boost/mpl/long.hpp> #include <boost/units/detail/dimension_impl.hpp> namespace boost { namespace units { /// Dimension lists in which all exponents resolve to zero reduce to @c dimensionless_type. struct dimensionless_type { typedef dimensionless_type type; typedef detail::dimension_list_tag tag; typedef mpl::long_<0> size; }; } // namespace units } // namespace boost #endif // BOOST_UNITS_DIMENSIONLESS_TYPE_HPP |
|
From: Matthias S. <mat...@us...> - 2007-04-13 05:17:14
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22757/boost/units Added Files: base_dimension.hpp Log Message: granular base_dimension header --- NEW FILE: base_dimension.hpp --- // mcs::units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2007 Matthias Christian Schabel // Copyright (C) 2007 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_BASE_DIMENSION_HPP #define BOOST_UNITS_BASE_DIMENSION_HPP #include <boost/mpl/int.hpp> #include <boost/mpl/list.hpp> #include <boost/units/static_rational.hpp> #include <boost/units/units_fwd.hpp> namespace boost { namespace units { /// A utility class for defining base dimensions. template<long N> struct base_dimension; /// each specialization must be separately instantiated in boost::units namespace to prevent duplication of tag values #define BOOST_UNITS_REGISTER_BASE_DIMENSION(name, N) \ template<> \ struct base_dimension<N> : \ public mpl::int_<N> \ { \ typedef base_dimension<N> this_type; \ typedef mpl::int_<N> value; \ \ typedef make_dimension_list< mpl::list< dim< this_type,static_rational<1> > > >::type type; \ }; \ \ typedef base_dimension<N> name \ } // namespace units } // namespace boost // doesn't work with g++ for some reason //namespace boost { // //namespace units { // ///// A utility class for defining base dimensions. //template<long N> struct base_dimension; // //} // namespace units // //} // namespace boost // ///// each specialization must be separately instantiated in boost::units namespace to prevent duplication of tag values //#define BOOST_UNITS_REGISTER_BASE_DIMENSION(name, N) \ //template<> \ //struct boost::units::base_dimension<N> : \ // public boost::mpl::int_<N> \ //{ \ // typedef boost::units::base_dimension<N> this_type; \ // typedef boost::mpl::int_<N> value; \ // \ // typedef boost::units::make_dimension_list< boost::mpl::list< boost::units::dim< this_type,boost::units::static_rational<1> > > >::type type; \ //}; \ // \ //typedef boost::units::base_dimension<N> name \ #endif // BOOST_UNITS_BASE_DIMENSION_HPP |
|
From: Matthias S. <mat...@us...> - 2007-04-13 05:09:15
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13206/boost/units Modified Files: quantity.hpp unit.hpp units_fwd.hpp Log Message: forward declarations and granular metafunctions/predicates added Index: units_fwd.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/units_fwd.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- units_fwd.hpp 13 Apr 2007 04:28:38 -0000 1.1 +++ units_fwd.hpp 13 Apr 2007 04:56:14 -0000 1.2 @@ -21,13 +21,13 @@ template<typename T> struct is_dim; -template<class Dim,class System> class unit; - template<class T> struct is_dimensionless; template<class S1,class S2> struct is_implicitly_convertible; template<class T> struct get_dimension; template<class T> struct get_system; +template<class Dim,class System> class unit; + template<class SystemTag,class DimensionTag> struct unit_info; template<class System> struct dimensionless_unit; template<class T> struct is_unit; Index: unit.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/unit.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- unit.hpp 12 Apr 2007 00:39:12 -0000 1.2 +++ unit.hpp 13 Apr 2007 04:56:14 -0000 1.3 @@ -15,6 +15,7 @@ #include <boost/units/dimension.hpp> #include <boost/units/system.hpp> +#include <boost/units/units_fwd.hpp> #include <boost/units/detail/unit_impl.hpp> namespace boost { @@ -27,7 +28,6 @@ template<class Dim,class System> class unit { - BOOST_STATIC_ASSERT((detail::check_system<System, Dim>::value == true)); public: typedef unit<Dim,System> this_type; typedef Dim dimension_type; @@ -38,6 +38,9 @@ //~unit() { } this_type& operator=(const this_type&) { } + + private: + BOOST_STATIC_ASSERT((detail::check_system<System, Dim>::value == true)); }; } @@ -56,69 +59,67 @@ namespace units { -/// utility class to simplify construction of dimensionless units in a system -template<class System> -struct dimensionless_unit -{ - typedef unit<dimensionless_type,System> type; -}; - /// class to specialize for IO -template<class SystemTag,class DimensionTag> struct unit_info; - -template<class T> -struct is_unit : - public mpl::false_ -{ }; - -/// check that a type is a unit -template<class Dim,class System> -struct is_unit< unit<Dim,System> > : - public mpl::true_ -{ }; - -template<class T,class System> -struct is_unit_of_system : - public mpl::false_ -{ }; - -/// check that a type is a unit in a specified system -template<class Dim,class System> -struct is_unit_of_system< unit<Dim,System>,System > : - public mpl::true_ -{ }; - -template<class T,class Dim> -struct is_unit_of_dimension : - public mpl::false_ -{ }; - -/// check that a type is a unit of the specified dimension -template<class Dim,class System> -struct is_unit_of_dimension< unit<Dim,System>,Dim > : - public mpl::true_ -{ }; - -template<class T> -struct is_dimensionless : - public mpl::false_ -{ }; - -/// check if a unit is dimensionless -template<class System> -struct is_dimensionless< unit<dimensionless_type,System> > : - public mpl::true_ -{ }; +//template<class SystemTag,class DimensionTag> struct unit_info; +// +///// utility class to simplify construction of dimensionless units in a system +//template<class System> +//struct dimensionless_unit +//{ +// typedef unit<dimensionless_type,System> type; +//}; +// +//template<class T> +//struct is_unit : +// public mpl::false_ +//{ }; +// +///// check that a type is a unit +//template<class Dim,class System> +//struct is_unit< unit<Dim,System> > : +// public mpl::true_ +//{ }; +// +//template<class T,class System> +//struct is_unit_of_system : +// public mpl::false_ +//{ }; +// +//template<class T,class Dim> +//struct is_unit_of_dimension : +// public mpl::false_ +//{ }; +// +///// check that a type is a unit of the specified dimension +//template<class Dim,class System> +//struct is_unit_of_dimension< unit<Dim,System>,Dim > : +// public mpl::true_ +//{ }; +// +///// check that a type is a dimensionless unit +//template<class T> +//struct is_dimensionless_unit : +// public is_unit_of_dimension<T,dimensionless_type> +//{ }; +// +///// check that a type is a unit in a specified system +//template<class Dim,class System> +//struct is_unit_of_system< unit<Dim,System>,System > : +// public mpl::true_ +//{ }; -/// check that a type is a dimensionless unit -template<class T> -struct is_dimensionless_unit : - public is_unit_of_dimension<T,dimensionless_type> -{ }; - -template<class T> struct get_dimension; +//template<class T> +//struct is_dimensionless : +// public mpl::false_ +//{ }; +// +///// check if a unit is dimensionless +//template<class System> +//struct is_dimensionless< unit<dimensionless_type,System> > : +// public mpl::true_ +//{ }; -template<class S1,class S2> struct is_implicitly_convertible; +//template<class S1,class S2> struct is_implicitly_convertible; template<class S1,class S2> struct is_implicitly_convertible : @@ -184,21 +185,23 @@ typedef heterogeneous_system<S2> system2_type; }; -/// get the dimension of a unit -template<class Dim,class System> -struct get_dimension< unit<Dim,System> > -{ - typedef Dim type; -}; - -template<class T> struct get_system; +//template<class T> struct get_dimension; +// +///// get the dimension of a unit +//template<class Dim,class System> +//struct get_dimension< unit<Dim,System> > +//{ +// typedef Dim type; +//}; -/// get the system of a unit -template<class Dim,class System> -struct get_system< unit<Dim,System> > -{ - typedef System type; -}; +//template<class T> struct get_system; +// +///// get the system of a unit +//template<class Dim,class System> +//struct get_system< unit<Dim,System> > +//{ +// typedef System type; +//}; /// unit unary plus typeof helper template<class Dim,class System> Index: quantity.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/quantity.hpp,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- quantity.hpp 13 Apr 2007 03:46:13 -0000 1.21 +++ quantity.hpp 13 Apr 2007 04:56:14 -0000 1.22 @@ -18,7 +18,11 @@ #include <boost/utility/enable_if.hpp> #include <boost/type_traits/is_convertible.hpp> +#include <boost/units/dimensionless_quantity.hpp> +#include <boost/units/get_dimension.hpp> +#include <boost/units/get_system.hpp> #include <boost/units/unit.hpp> +#include <boost/units/units_fwd.hpp> namespace boost { @@ -282,6 +286,8 @@ namespace units { +namespace detail { + /// helper class for quantity_cast template<class X,class Y> struct quantity_cast_helper; @@ -303,23 +309,25 @@ type operator()(const quantity<Unit,X>& source) { return source.value(); } }; +} // namespace detail + /// quantity_cast provides mutating access to underlying quantity value_type template<class X,class Y> inline -typename quantity_cast_helper<X,Y>::type +typename detail::quantity_cast_helper<X,Y>::type quantity_cast(Y& source) { - quantity_cast_helper<X,Y> qch; + detail::quantity_cast_helper<X,Y> qch; return qch(source); } template<class X,class Y> inline -typename quantity_cast_helper<X,const Y>::type +typename detail::quantity_cast_helper<X,const Y>::type quantity_cast(const Y& source) { - quantity_cast_helper<X,const Y> qch; + detail::quantity_cast_helper<X,const Y> qch; return qch(source); } @@ -331,75 +339,75 @@ using std::swap; swap(quantity_cast<Y&>(lhs),quantity_cast<Y&>(rhs)); } - -/// utility class to simplify construction of dimensionless quantities -template<class System,class Y> -struct dimensionless_quantity -{ - typedef quantity<typename dimensionless_unit<System>::type,Y> type; -}; - -/// check that a type is a quantity -template<typename T> -struct is_quantity : - public mpl::false_ -{ }; - -template<class Unit, - class Y> -struct is_quantity< quantity<Unit,Y> > : - public mpl::true_ -{ }; - -/// check that a type is a quantity in a specified system -template<class T,class System> -struct is_quantity_of_system : - public mpl::false_ -{ }; - -template<class Dim, - class System, - class Y> -struct is_quantity_of_system< quantity< unit<Dim,System>,Y>,System > : - public mpl::true_ -{ }; - -/// check that a type is a quantity of the specified dimension -template<class T,class Dim> -struct is_quantity_of_dimension : - public mpl::false_ -{ }; - -template<class Dim,class System,class Y> -struct is_quantity_of_dimension< quantity< unit<Dim,System>,Y>,Dim > : - public mpl::true_ -{ }; - -/// check that a type is dimensionless -template<class System,class Y> -struct is_dimensionless< quantity<unit<dimensionless_type,System>,Y> > : - public mpl::true_ -{ }; - -/// check that a type is a dimensionless quantity -template<class T> -struct is_dimensionless_quantity : - public is_quantity_of_dimension<T,dimensionless_type> -{ }; - -/// get dimension -template<class Unit,class Y> -struct get_dimension< quantity<Unit,Y> > -{ - typedef typename get_dimension<Unit>::type type; -}; - -/// get system -template<class Unit,class Y> -struct get_system< quantity<Unit,Y> > -{ - typedef typename get_system<Unit>::type type; -}; +// +///// utility class to simplify construction of dimensionless quantities +//template<class System,class Y> +//struct dimensionless_quantity +//{ +// typedef quantity<typename dimensionless_unit<System>::type,Y> type; +//}; +// +///// check that a type is a quantity +//template<typename T> +//struct is_quantity : +// public mpl::false_ +//{ }; +// +//template<class Unit, +// class Y> +//struct is_quantity< quantity<Unit,Y> > : +// public mpl::true_ +//{ }; +// +///// check that a type is a quantity of the specified dimension +//template<class T,class Dim> +//struct is_quantity_of_dimension : +// public mpl::false_ +//{ }; +// +//template<class Dim,class System,class Y> +//struct is_quantity_of_dimension< quantity< unit<Dim,System>,Y>,Dim > : +// public mpl::true_ +//{ }; +// +///// check that a type is a dimensionless quantity +//template<class T> +//struct is_dimensionless_quantity : +// public is_quantity_of_dimension<T,dimensionless_type> +//{ }; +// +///// check that a type is a quantity in a specified system +//template<class T,class System> +//struct is_quantity_of_system : +// public mpl::false_ +//{ }; +// +//template<class Dim, +// class System, +// class Y> +//struct is_quantity_of_system< quantity< unit<Dim,System>,Y>,System > : +// public mpl::true_ +//{ }; +// +///// check that a type is dimensionless +//template<class System,class Y> +//struct is_dimensionless< quantity<unit<dimensionless_type,System>,Y> > : +// public mpl::true_ +//{ }; +// +///// get dimension +//template<class Unit,class Y> +//struct get_dimension< quantity<Unit,Y> > +//{ +// typedef typename get_dimension<Unit>::type type; +//}; +// +///// get system +//template<class Unit,class Y> +//struct get_system< quantity<Unit,Y> > +//{ +// typedef typename get_system<Unit>::type type; +//}; /// specialize unary plus typeof helper template<class Unit,class Y> |
|
From: Matthias S. <mat...@us...> - 2007-04-13 05:08:58
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13206/boost/units Modified Files: quantity.hpp unit.hpp units_fwd.hpp Log Message: forward declarations and granular metafunctions/predicates added Index: units_fwd.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/units_fwd.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- units_fwd.hpp 13 Apr 2007 04:28:38 -0000 1.1 +++ units_fwd.hpp 13 Apr 2007 04:56:14 -0000 1.2 @@ -21,13 +21,13 @@ template<typename T> struct is_dim; -template<class Dim,class System> class unit; - template<class T> struct is_dimensionless; template<class S1,class S2> struct is_implicitly_convertible; template<class T> struct get_dimension; template<class T> struct get_system; +template<class Dim,class System> class unit; + template<class SystemTag,class DimensionTag> struct unit_info; template<class System> struct dimensionless_unit; template<class T> struct is_unit; Index: unit.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/unit.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- unit.hpp 12 Apr 2007 00:39:12 -0000 1.2 +++ unit.hpp 13 Apr 2007 04:56:14 -0000 1.3 @@ -15,6 +15,7 @@ #include <boost/units/dimension.hpp> #include <boost/units/system.hpp> +#include <boost/units/units_fwd.hpp> #include <boost/units/detail/unit_impl.hpp> namespace boost { @@ -27,7 +28,6 @@ template<class Dim,class System> class unit { - BOOST_STATIC_ASSERT((detail::check_system<System, Dim>::value == true)); public: typedef unit<Dim,System> this_type; typedef Dim dimension_type; @@ -38,6 +38,9 @@ //~unit() { } this_type& operator=(const this_type&) { } + + private: + BOOST_STATIC_ASSERT((detail::check_system<System, Dim>::value == true)); }; } @@ -56,69 +59,67 @@ namespace units { -/// utility class to simplify construction of dimensionless units in a system -template<class System> -struct dimensionless_unit -{ - typedef unit<dimensionless_type,System> type; -}; - /// class to specialize for IO -template<class SystemTag,class DimensionTag> struct unit_info; - -template<class T> -struct is_unit : - public mpl::false_ -{ }; - -/// check that a type is a unit -template<class Dim,class System> -struct is_unit< unit<Dim,System> > : - public mpl::true_ -{ }; - -template<class T,class System> -struct is_unit_of_system : - public mpl::false_ -{ }; - -/// check that a type is a unit in a specified system -template<class Dim,class System> -struct is_unit_of_system< unit<Dim,System>,System > : - public mpl::true_ -{ }; - -template<class T,class Dim> -struct is_unit_of_dimension : - public mpl::false_ -{ }; - -/// check that a type is a unit of the specified dimension -template<class Dim,class System> -struct is_unit_of_dimension< unit<Dim,System>,Dim > : - public mpl::true_ -{ }; - -template<class T> -struct is_dimensionless : - public mpl::false_ -{ }; - -/// check if a unit is dimensionless -template<class System> -struct is_dimensionless< unit<dimensionless_type,System> > : - public mpl::true_ -{ }; +//template<class SystemTag,class DimensionTag> struct unit_info; +// +///// utility class to simplify construction of dimensionless units in a system +//template<class System> +//struct dimensionless_unit +//{ +// typedef unit<dimensionless_type,System> type; +//}; +// +//template<class T> +//struct is_unit : +// public mpl::false_ +//{ }; +// +///// check that a type is a unit +//template<class Dim,class System> +//struct is_unit< unit<Dim,System> > : +// public mpl::true_ +//{ }; +// +//template<class T,class System> +//struct is_unit_of_system : +// public mpl::false_ +//{ }; +// +//template<class T,class Dim> +//struct is_unit_of_dimension : +// public mpl::false_ +//{ }; +// +///// check that a type is a unit of the specified dimension +//template<class Dim,class System> +//struct is_unit_of_dimension< unit<Dim,System>,Dim > : +// public mpl::true_ +//{ }; +// +///// check that a type is a dimensionless unit +//template<class T> +//struct is_dimensionless_unit : +// public is_unit_of_dimension<T,dimensionless_type> +//{ }; +// +///// check that a type is a unit in a specified system +//template<class Dim,class System> +//struct is_unit_of_system< unit<Dim,System>,System > : +// public mpl::true_ +//{ }; -/// check that a type is a dimensionless unit -template<class T> -struct is_dimensionless_unit : - public is_unit_of_dimension<T,dimensionless_type> -{ }; - -template<class T> struct get_dimension; +//template<class T> +//struct is_dimensionless : +// public mpl::false_ +//{ }; +// +///// check if a unit is dimensionless +//template<class System> +//struct is_dimensionless< unit<dimensionless_type,System> > : +// public mpl::true_ +//{ }; -template<class S1,class S2> struct is_implicitly_convertible; +//template<class S1,class S2> struct is_implicitly_convertible; template<class S1,class S2> struct is_implicitly_convertible : @@ -184,21 +185,23 @@ typedef heterogeneous_system<S2> system2_type; }; -/// get the dimension of a unit -template<class Dim,class System> -struct get_dimension< unit<Dim,System> > -{ - typedef Dim type; -}; - -template<class T> struct get_system; +//template<class T> struct get_dimension; +// +///// get the dimension of a unit +//template<class Dim,class System> +//struct get_dimension< unit<Dim,System> > +//{ +// typedef Dim type; +//}; -/// get the system of a unit -template<class Dim,class System> -struct get_system< unit<Dim,System> > -{ - typedef System type; -}; +//template<class T> struct get_system; +// +///// get the system of a unit +//template<class Dim,class System> +//struct get_system< unit<Dim,System> > +//{ +// typedef System type; +//}; /// unit unary plus typeof helper template<class Dim,class System> Index: quantity.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/quantity.hpp,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- quantity.hpp 13 Apr 2007 03:46:13 -0000 1.21 +++ quantity.hpp 13 Apr 2007 04:56:14 -0000 1.22 @@ -18,7 +18,11 @@ #include <boost/utility/enable_if.hpp> #include <boost/type_traits/is_convertible.hpp> +#include <boost/units/dimensionless_quantity.hpp> +#include <boost/units/get_dimension.hpp> +#include <boost/units/get_system.hpp> #include <boost/units/unit.hpp> +#include <boost/units/units_fwd.hpp> namespace boost { @@ -282,6 +286,8 @@ namespace units { +namespace detail { + /// helper class for quantity_cast template<class X,class Y> struct quantity_cast_helper; @@ -303,23 +309,25 @@ type operator()(const quantity<Unit,X>& source) { return source.value(); } }; +} // namespace detail + /// quantity_cast provides mutating access to underlying quantity value_type template<class X,class Y> inline -typename quantity_cast_helper<X,Y>::type +typename detail::quantity_cast_helper<X,Y>::type quantity_cast(Y& source) { - quantity_cast_helper<X,Y> qch; + detail::quantity_cast_helper<X,Y> qch; return qch(source); } template<class X,class Y> inline -typename quantity_cast_helper<X,const Y>::type +typename detail::quantity_cast_helper<X,const Y>::type quantity_cast(const Y& source) { - quantity_cast_helper<X,const Y> qch; + detail::quantity_cast_helper<X,const Y> qch; return qch(source); } @@ -331,75 +339,75 @@ using std::swap; swap(quantity_cast<Y&>(lhs),quantity_cast<Y&>(rhs)); } - -/// utility class to simplify construction of dimensionless quantities -template<class System,class Y> -struct dimensionless_quantity -{ - typedef quantity<typename dimensionless_unit<System>::type,Y> type; -}; - -/// check that a type is a quantity -template<typename T> -struct is_quantity : - public mpl::false_ -{ }; - -template<class Unit, - class Y> -struct is_quantity< quantity<Unit,Y> > : - public mpl::true_ -{ }; - -/// check that a type is a quantity in a specified system -template<class T,class System> -struct is_quantity_of_system : - public mpl::false_ -{ }; - -template<class Dim, - class System, - class Y> -struct is_quantity_of_system< quantity< unit<Dim,System>,Y>,System > : - public mpl::true_ -{ }; - -/// check that a type is a quantity of the specified dimension -template<class T,class Dim> -struct is_quantity_of_dimension : - public mpl::false_ -{ }; - -template<class Dim,class System,class Y> -struct is_quantity_of_dimension< quantity< unit<Dim,System>,Y>,Dim > : - public mpl::true_ -{ }; - -/// check that a type is dimensionless -template<class System,class Y> -struct is_dimensionless< quantity<unit<dimensionless_type,System>,Y> > : - public mpl::true_ -{ }; - -/// check that a type is a dimensionless quantity -template<class T> -struct is_dimensionless_quantity : - public is_quantity_of_dimension<T,dimensionless_type> -{ }; - -/// get dimension -template<class Unit,class Y> -struct get_dimension< quantity<Unit,Y> > -{ - typedef typename get_dimension<Unit>::type type; -}; - -/// get system -template<class Unit,class Y> -struct get_system< quantity<Unit,Y> > -{ - typedef typename get_system<Unit>::type type; -}; +// +///// utility class to simplify construction of dimensionless quantities +//template<class System,class Y> +//struct dimensionless_quantity +//{ +// typedef quantity<typename dimensionless_unit<System>::type,Y> type; +//}; +// +///// check that a type is a quantity +//template<typename T> +//struct is_quantity : +// public mpl::false_ +//{ }; +// +//template<class Unit, +// class Y> +//struct is_quantity< quantity<Unit,Y> > : +// public mpl::true_ +//{ }; +// +///// check that a type is a quantity of the specified dimension +//template<class T,class Dim> +//struct is_quantity_of_dimension : +// public mpl::false_ +//{ }; +// +//template<class Dim,class System,class Y> +//struct is_quantity_of_dimension< quantity< unit<Dim,System>,Y>,Dim > : +// public mpl::true_ +//{ }; +// +///// check that a type is a dimensionless quantity +//template<class T> +//struct is_dimensionless_quantity : +// public is_quantity_of_dimension<T,dimensionless_type> +//{ }; +// +///// check that a type is a quantity in a specified system +//template<class T,class System> +//struct is_quantity_of_system : +// public mpl::false_ +//{ }; +// +//template<class Dim, +// class System, +// class Y> +//struct is_quantity_of_system< quantity< unit<Dim,System>,Y>,System > : +// public mpl::true_ +//{ }; +// +///// check that a type is dimensionless +//template<class System,class Y> +//struct is_dimensionless< quantity<unit<dimensionless_type,System>,Y> > : +// public mpl::true_ +//{ }; +// +///// get dimension +//template<class Unit,class Y> +//struct get_dimension< quantity<Unit,Y> > +//{ +// typedef typename get_dimension<Unit>::type type; +//}; +// +///// get system +//template<class Unit,class Y> +//struct get_system< quantity<Unit,Y> > +//{ +// typedef typename get_system<Unit>::type type; +//}; /// specialize unary plus typeof helper template<class Unit,class Y> |
|
From: Matthias S. <mat...@us...> - 2007-04-13 05:05:29
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17863/boost/units Added Files: dimensionless_quantity.hpp dimensionless_unit.hpp Log Message: more granular headers --- NEW FILE: dimensionless_quantity.hpp --- // mcs::units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2007 Matthias Christian Schabel // Copyright (C) 2007 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_DIMENSIONLESS_QUANTITY_HPP #define BOOST_UNITS_DIMENSIONLESS_QUANTITY_HPP #include <boost/units/dimensionless_unit.hpp> #include <boost/units/units_fwd.hpp> namespace boost { namespace units { /// utility class to simplify construction of dimensionless quantities template<class System,class Y> struct dimensionless_quantity { typedef quantity<typename dimensionless_unit<System>::type,Y> type; }; } // namespace units } // namespace boost #endif // BOOST_UNITS_DIMENSIONLESS_QUANTITY_HPP --- NEW FILE: dimensionless_unit.hpp --- // mcs::units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2007 Matthias Christian Schabel // Copyright (C) 2007 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_DIMENSIONLESS_UNIT_HPP #define BOOST_UNITS_DIMENSIONLESS_UNIT_HPP //#include <boost/units/dimensionless_type.hpp> #include <boost/units/dimension.hpp> #include <boost/units/units_fwd.hpp> namespace boost { namespace units { /// utility class to simplify construction of dimensionless units in a system template<class System> struct dimensionless_unit { typedef unit<dimensionless_type,System> type; }; } // namespace units } // namespace boost #endif // BOOST_UNITS_DIMENSIONLESS_UNIT_HPP |
|
From: Matthias S. <mat...@us...> - 2007-04-13 04:56:14
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/detail In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13206/boost/units/detail Modified Files: dim_impl.hpp Log Message: forward declarations and granular metafunctions/predicates added Index: dim_impl.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/detail/dim_impl.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- dim_impl.hpp 12 Apr 2007 00:39:12 -0000 1.2 +++ dim_impl.hpp 13 Apr 2007 04:56:14 -0000 1.3 @@ -25,7 +25,7 @@ namespace detail { -struct dim_tag {}; +struct dim_tag { }; } @@ -43,10 +43,10 @@ template<typename T,typename V> struct dim { - typedef dim type; + typedef dim type; typedef detail::dim_tag tag; - typedef T tag_type; - typedef V value_type; + typedef T tag_type; + typedef V value_type; }; } |
|
From: Matthias S. <mat...@us...> - 2007-04-13 04:54:35
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12785/boost/units Added Files: get_dimension.hpp get_system.hpp Log Message: add granular headers for metafunctions --- NEW FILE: get_dimension.hpp --- // mcs::units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2007 Matthias Christian Schabel // Copyright (C) 2007 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_GET_DIMENSION_HPP #define BOOST_UNITS_GET_DIMENSION_HPP #include <boost/units/units_fwd.hpp> namespace boost { namespace units { /// get the dimension of a unit template<class Dim,class System> struct get_dimension< unit<Dim,System> > { typedef Dim type; }; /// get the dimension of a quantity template<class Unit,class Y> struct get_dimension< quantity<Unit,Y> > { typedef typename get_dimension<Unit>::type type; }; } // namespace units } // namespace boost #endif // BOOST_UNITS_GET_DIMENSION_HPP --- NEW FILE: get_system.hpp --- // mcs::units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2007 Matthias Christian Schabel // Copyright (C) 2007 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_GET_SYSTEM_HPP #define BOOST_UNITS_GET_SYSTEM_HPP #include <boost/units/units_fwd.hpp> namespace boost { namespace units { /// get the system of a unit template<class Dim,class System> struct get_system< unit<Dim,System> > { typedef System type; }; /// get the system of a quantity template<class Unit,class Y> struct get_system< quantity<Unit,Y> > { typedef typename get_system<Unit>::type type; }; } // namespace units } // namespace boost #endif // BOOST_UNITS_GET_SYSTEM_HPP |
|
From: Matthias S. <mat...@us...> - 2007-04-13 04:53:49
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12373/boost/units Added Files: is_dimensionless.hpp is_dimensionless_quantity.hpp is_dimensionless_unit.hpp is_quantity.hpp is_quantity_of_dimension.hpp is_quantity_of_system.hpp is_unit.hpp is_unit_of_dimension.hpp is_unit_of_system.hpp Log Message: add granular headers for predicates --- NEW FILE: is_dimensionless_unit.hpp --- // mcs::units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2007 Matthias Christian Schabel // Copyright (C) 2007 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_IS_DIMENSIONLESS_UNIT_HPP #define BOOST_UNITS_IS_DIMENSIONLESS_UNIT_HPP #include <boost/units/is_unit_of_dimension.hpp> #include <boost/units/units_fwd.hpp> namespace boost { namespace units { /// check that a type is a dimensionless unit template<class T> struct is_dimensionless_unit : public is_unit_of_dimension<T,dimensionless_type> { }; } // namespace units } // namespace boost #endif // BOOST_UNITS_IS_DIMENSIONLESS_UNIT_HPP --- NEW FILE: is_quantity_of_system.hpp --- // mcs::units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2007 Matthias Christian Schabel // Copyright (C) 2007 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_IS_QUANTITY_OF_SYSTEM_HPP #define BOOST_UNITS_IS_QUANTITY_OF_SYSTEM_HPP #include <boost/units/mpl/bool.hpp> #include <boost/units/units_fwd.hpp> namespace boost { namespace units { /// check that a type is a quantity in a specified system template<class T,class System> struct is_quantity_of_system : public mpl::false_ { }; template<class Dim, class System, class Y> struct is_quantity_of_system< quantity< unit<Dim,System>,Y>,System > : public mpl::true_ { }; } // namespace units } // namespace boost #endif // BOOST_UNITS_IS_QUANTITY_OF_SYSTEM_HPP --- NEW FILE: is_dimensionless_quantity.hpp --- // mcs::units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2007 Matthias Christian Schabel // Copyright (C) 2007 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_IS_DIMENSIONLESS_QUANTITY_HPP #define BOOST_UNITS_IS_DIMENSIONLESS_QUANTITY_HPP #include <boost/units/is_quantity_of_dimension.hpp> #include <boost/units/units_fwd.hpp> namespace boost { namespace units { /// check that a type is a dimensionless quantity template<class T> struct is_dimensionless_quantity : public is_quantity_of_dimension<T,dimensionless_type> { }; } // namespace units } // namespace boost #endif // BOOST_UNITS_IS_DIMENSIONLESS_QUANTITY_HPP --- NEW FILE: is_unit_of_system.hpp --- // mcs::units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2007 Matthias Christian Schabel // Copyright (C) 2007 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_IS_UNIT_OF_SYSTEM_HPP #define BOOST_UNITS_IS_UNIT_OF_SYSTEM_HPP #include <boost/units/mpl/bool.hpp> #include <boost/units/units_fwd.hpp> namespace boost { namespace units { /// check that a type is a unit in a specified system template<class T,class System> struct is_unit_of_system : public mpl::false_ { }; template<class Dim,class System> struct is_unit_of_system< unit<Dim,System>,System > : public mpl::true_ { }; } // namespace units } // namespace boost #endif // BOOST_UNITS_IS_UNIT_OF_SYSTEM_HPP --- NEW FILE: is_unit.hpp --- // mcs::units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2007 Matthias Christian Schabel // Copyright (C) 2007 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_IS_UNIT_HPP #define BOOST_UNITS_IS_UNIT_HPP #include <boost/units/units_fwd.hpp> namespace boost { namespace units { /// check that a type is a unit template<class T> struct is_unit : public mpl::false_ { }; template<class Dim,class System> struct is_unit< unit<Dim,System> > : public mpl::true_ { }; } // namespace units } // namespace boost #endif // BOOST_UNITS_IS_UNIT_HPP --- NEW FILE: is_dimensionless.hpp --- // mcs::units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2007 Matthias Christian Schabel // Copyright (C) 2007 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_IS_DIMENSIONLESS_HPP #define BOOST_UNITS_IS_DIMENSIONLESS_HPP #include <boost/units/units_fwd.hpp> namespace boost { namespace units { template<class T> struct is_dimensionless : public mpl::false_ { }; /// check if a unit is dimensionless template<class System> struct is_dimensionless< unit<dimensionless_type,System> > : public mpl::true_ { }; /// check if a quantity is dimensionless template<class Unit,class Y> struct is_dimensionless< quantity<Unit,Y> > : public is_dimensionless<Unit> { }; } // namespace units } // namespace boost #endif // BOOST_UNITS_IS_DIMENSIONLESS_HPP --- NEW FILE: is_quantity.hpp --- // mcs::units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2007 Matthias Christian Schabel // Copyright (C) 2007 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_IS_QUANTITY_HPP #define BOOST_UNITS_IS_QUANTITY_HPP #include <boost/units/units_fwd.hpp> namespace boost { namespace units { /// check that a type is a quantity template<typename T> struct is_quantity : public mpl::false_ { }; template<class Unit, class Y> struct is_quantity< quantity<Unit,Y> > : public mpl::true_ { }; } // namespace units } // namespace boost #endif // BOOST_UNITS_IS_QUANTITY_HPP --- NEW FILE: is_quantity_of_dimension.hpp --- // mcs::units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2007 Matthias Christian Schabel // Copyright (C) 2007 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_IS_QUANTITY_OF_DIMENSION_HPP #define BOOST_UNITS_IS_QUANTITY_OF_DIMENSION_HPP #include <boost/units/mpl/bool.hpp> #include <boost/units/units_fwd.hpp> namespace boost { namespace units { /// check that a type is a quantity of the specified dimension template<class T,class Dim> struct is_quantity_of_dimension : public mpl::false_ { }; template<class Dim,class System,class Y> struct is_quantity_of_dimension< quantity< unit<Dim,System>,Y>,Dim > : public mpl::true_ { }; } // namespace units } // namespace boost #endif // BOOST_UNITS_IS_QUANTITY_OF_DIMENSION_HPP --- NEW FILE: is_unit_of_dimension.hpp --- // mcs::units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2007 Matthias Christian Schabel // Copyright (C) 2007 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_IS_UNIT_OF_DIMENSION_HPP #define BOOST_UNITS_IS_UNIT_OF_DIMENSION_HPP #include <boost/units/mpl/bool.hpp> #include <boost/units/units_fwd.hpp> namespace boost { namespace units { /// check that a type is a unit of the specified dimension template<class T,class Dim> struct is_unit_of_dimension : public mpl::false_ { }; template<class Dim,class System> struct is_unit_of_dimension< unit<Dim,System>,Dim > : public mpl::true_ { }; } // namespace units } // namespace boost #endif // BOOST_UNITS_IS_UNIT_OF_DIMENSION_HPP |
|
From: Matthias S. <mat...@us...> - 2007-04-13 04:28:42
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2188/boost/units Added Files: units_fwd.hpp Log Message: first pass forward declaration header --- NEW FILE: units_fwd.hpp --- // mcs::units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2007 Matthias Christian Schabel // Copyright (C) 2007 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_UNITSFWD_HPP #define BOOST_UNITS_UNITSFWD_HPP namespace boost { namespace units { template<long N> struct ordinal; template<typename T,typename V> struct dim; template<typename T> struct is_dim; template<class Dim,class System> class unit; template<class T> struct is_dimensionless; template<class S1,class S2> struct is_implicitly_convertible; template<class T> struct get_dimension; template<class T> struct get_system; template<class SystemTag,class DimensionTag> struct unit_info; template<class System> struct dimensionless_unit; template<class T> struct is_unit; template<class T,class Dim> struct is_unit_of_dimension; template<class T,class System> struct is_unit_of_system; template<class Unit,class Y> class quantity; template<class System,class Y> struct dimensionless_quantity; template<class T> struct is_quantity; template<class T,class Dim> struct is_quantity_of_dimension; template<class T,class System> struct is_quantity_of_system; } // namespace units } // namespace boost #endif // BOOST_UNITS_UNITSFWD_HPP |
|
From: Matthias S. <mat...@us...> - 2007-04-13 03:46:44
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18067/boost/units Modified Files: dimension.hpp Log Message: minor Index: dimension.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/dimension.hpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- dimension.hpp 13 Apr 2007 01:05:28 -0000 1.7 +++ dimension.hpp 13 Apr 2007 03:46:35 -0000 1.8 @@ -119,16 +119,31 @@ /// each specialization must be separately instantiated in boost::units namespace to prevent duplication of tag values #define BOOST_UNITS_REGISTER_BASE_DIMENSION(name, N) \ template<> \ -struct boost::units::base_dimension<N> : \ - public boost::mpl::int_<N> \ +struct base_dimension<N> : \ + public mpl::int_<N> \ { \ - typedef boost::units::base_dimension<N> this_type; \ - typedef boost::mpl::int_<N> value; \ + typedef base_dimension<N> this_type; \ + typedef mpl::int_<N> value; \ \ - typedef boost::units::make_dimension_list< boost::mpl::list< boost::units::dim< this_type,boost::units::static_rational<1> > > >::type type;\ + typedef make_dimension_list< mpl::list< dim< this_type,static_rational<1> > > >::type type; \ }; \ \ -typedef boost::units::base_dimension<N> name +typedef base_dimension<N> name \ + +//// gcc doesn't like this for some reason... +///// each specialization must be separately instantiated in boost::units namespace to prevent duplication of tag values +//#define BOOST_UNITS_REGISTER_BASE_DIMENSION(name, N) \ +//template<> \ +//struct boost::units::base_dimension<N> : \ +// public boost::mpl::int_<N> \ +//{ \ +// typedef boost::units::base_dimension<N> this_type; \ +// typedef boost::mpl::int_<N> value; \ +// \ +// typedef boost::units::make_dimension_list< boost::mpl::list< boost::units::dim< this_type,boost::units::static_rational<1> > > >::type type;\ +//}; \ +// \ +//typedef boost::units::base_dimension<N> name \ /// A utility class for defining composite dimensions with integer powers. template<class DT1 = dimensionless_type,int E1 = 0, |
|
From: Matthias S. <mat...@us...> - 2007-04-13 03:46:43
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18067/boost/units/systems Modified Files: physical_units.hpp Log Message: minor Index: physical_units.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/physical_units.hpp,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- physical_units.hpp 11 Apr 2007 21:25:10 -0000 1.15 +++ physical_units.hpp 13 Apr 2007 03:46:35 -0000 1.16 @@ -38,33 +38,6 @@ BOOST_UNITS_REGISTER_BASE_DIMENSION(plane_angle_dim,-2); ///> base dimension of plane angle BOOST_UNITS_REGISTER_BASE_DIMENSION(solid_angle_dim,-1); ///> base dimension of solid angle -///// tag representing length -//typedef base_dimension<-9> length_dim; -// -///// tag representing mass -//typedef base_dimension<-8> mass_dim; -// -///// tag representing time -//typedef base_dimension<-7> time_dim; -// -///// tag representing electrical current -//typedef base_dimension<-6> current_dim; -// -///// tag representing temperature -//typedef base_dimension<-5> temperature_dim; -// -///// tag representing amount of substance -//typedef base_dimension<-4> amount_dim; -// -///// tag representing luminous intensity -//typedef base_dimension<-3> luminous_intensity_dim; -// -///// tag representing plane angle -//typedef base_dimension<-2> plane_angle_dim; -// -///// tag representing solid angle -//typedef base_dimension<-1> solid_angle_dim; - } } |
|
From: Matthias S. <mat...@us...> - 2007-04-13 03:46:18
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17676/boost/units Modified Files: quantity.hpp Log Message: missed one BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY check in quantity() constructor Index: quantity.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/quantity.hpp,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- quantity.hpp 13 Apr 2007 02:22:56 -0000 1.20 +++ quantity.hpp 13 Apr 2007 03:46:13 -0000 1.21 @@ -40,10 +40,16 @@ BOOST_STATIC_ASSERT((detail::check_system<system_type,dimension_type>::value == true)); - quantity() : val_() { } - quantity(const this_type& source) : val_(source.val_) { + quantity() : val_() + { + BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); + } + + quantity(const this_type& source) : val_(source.val_) + { BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); } + //~quantity() { } this_type& operator=(const this_type& source) @@ -165,15 +171,22 @@ typedef dimensionless_type dimension_type; typedef unit<dimension_type,system_type> unit_type; - quantity() : val_() { + quantity() : val_() + { BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); } - quantity(value_type val) : val_(val) { + + /// construction from raw @c value_type is allowed + quantity(value_type val) : val_(val) + { BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); - } ///< construction from raw @c value_type is allowed - quantity(const this_type& source) : val_(source.val_) { + } + + quantity(const this_type& source) : val_(source.val_) + { BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); } + //~quantity() { } this_type& operator=(const this_type& source) @@ -932,108 +945,6 @@ return val1.value() >= val2.value(); } -///// runtime operator== -//template<class System, -// class Dim1, -// class Dim2, -// class X, -// class Y> -//inline -//bool -//operator==(const quantity<unit<Dim1,System>,X>& val1, -// const quantity<unit<Dim2,System>,Y>& val2) -//{ -// // ensure dimension lists are commensurate -// BOOST_STATIC_ASSERT((is_same<Dim1,Dim2>::value == true)); -// -// return val1.value() == val2.value(); -//} -// -///// runtime operator!= -//template<class System, -// class Dim1, -// class Dim2, -// class X, -// class Y> -//inline -//bool -//operator!=(const quantity<unit<Dim1,System>,X>& val1, -// const quantity<unit<Dim2,System>,Y>& val2) -//{ -// // ensure dimension lists are commensurate -// BOOST_STATIC_ASSERT((is_same<Dim1,Dim2>::value == true)); -// -// return val1.value() != val2.value(); -//} -// -///// runtime operator< -//template<class System, -// class Dim1, -// class Dim2, -// class X, -// class Y> -//inline -//bool -//operator<(const quantity<unit<Dim1,System>,X>& val1, -// const quantity<unit<Dim2,System>,Y>& val2) -//{ -// // ensure dimension lists are commensurate -// BOOST_STATIC_ASSERT((is_same<Dim1,Dim2>::value == true)); -// -// return val1.value() < val2.value(); -//} -// -///// runtime operator<= -//template<class System, -// class Dim1, -// class Dim2, -// class X, -// class Y> -//inline -//bool -//operator<=(const quantity<unit<Dim1,System>,X>& val1, -// const quantity<unit<Dim2,System>,Y>& val2) -//{ -// // ensure dimension lists are commensurate -// BOOST_STATIC_ASSERT((is_same<Dim1,Dim2>::value == true)); -// -// return val1.value() <= val2.value(); -//} -// -///// runtime operator> -//template<class System, -// class Dim1, -// class Dim2, -// class X, -// class Y> -//inline -//bool -//operator>(const quantity<unit<Dim1,System>,X>& val1, -// const quantity<unit<Dim2,System>,Y>& val2) -//{ -// // ensure dimension lists are commensurate -// BOOST_STATIC_ASSERT((is_same<Dim1,Dim2>::value == true)); -// -// return val1.value() > val2.value(); -//} -// -///// runtime operator>= -//template<class System, -// class Dim1, -// class Dim2, -// class X, -// class Y> -//inline -//bool -//operator>=(const quantity<unit<Dim1,System>,X>& val1, -// const quantity<unit<Dim2,System>,Y>& val2) -//{ -// // ensure dimension lists are commensurate -// BOOST_STATIC_ASSERT((is_same<Dim1,Dim2>::value == true)); -// -// return val1.value() >= val2.value(); -//} - } // namespace units } // namespace boost |
|
From: Steven W. <ste...@us...> - 2007-04-13 02:24:32
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17203/boost-sandbox/boost/units Modified Files: quantity.hpp Log Message: don't hard-code unit<...> into multiplication and division Index: quantity.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/quantity.hpp,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- quantity.hpp 13 Apr 2007 01:06:31 -0000 1.19 +++ quantity.hpp 13 Apr 2007 02:22:56 -0000 1.20 @@ -671,117 +671,109 @@ } /// runtime quantity times scalar -template<class System, - class Dim, +template<class Unit, class X, class Y> inline -typename multiply_typeof_helper< quantity<unit<Dim,System>,X>,Y >::type -operator*(const quantity<unit<Dim,System>,X>& lhs,const Y& rhs) +typename multiply_typeof_helper< quantity<Unit,X>,Y >::type +operator*(const quantity<Unit,X>& lhs,const Y& rhs) { - typedef typename multiply_typeof_helper< quantity<unit<Dim,System>,X>,Y >::type type; + typedef typename multiply_typeof_helper< quantity<Unit,X>,Y >::type type; return type::from_value(lhs.value()*rhs); } /// runtime scalar times quantity -template<class System, - class Dim, +template<class Unit, class X, class Y> inline -typename multiply_typeof_helper< X,quantity<unit<Dim,System>,Y> >::type -operator*(const X& lhs,const quantity<unit<Dim,System>,Y>& rhs) +typename multiply_typeof_helper< X,quantity<Unit,Y> >::type +operator*(const X& lhs,const quantity<Unit,Y>& rhs) { - typedef typename multiply_typeof_helper< X,quantity<unit<Dim,System>,Y> >::type type; + typedef typename multiply_typeof_helper< X,quantity<Unit,Y> >::type type; return type::from_value(lhs*rhs.value()); } /// runtime quantity divided by scalar -template<class System, - class Dim, +template<class Unit, class X, class Y> inline -typename divide_typeof_helper< quantity<unit<Dim,System>,X>,Y >::type -operator/(const quantity<unit<Dim,System>,X>& lhs,const Y& rhs) +typename divide_typeof_helper< quantity<Unit,X>,Y >::type +operator/(const quantity<Unit,X>& lhs,const Y& rhs) { - typedef typename divide_typeof_helper< quantity<unit<Dim,System>,X>,Y >::type type; + typedef typename divide_typeof_helper< quantity<Unit,X>,Y >::type type; return type::from_value(lhs.value()/rhs); } /// runtime scalar divided by quantity -template<class System, - class Dim, +template<class Unit, class X, class Y> inline -typename divide_typeof_helper< X,quantity<unit<Dim,System>,Y> >::type -operator/(const X& lhs,const quantity<unit<Dim,System>,Y>& rhs) +typename divide_typeof_helper< X,quantity<Unit,Y> >::type +operator/(const X& lhs,const quantity<Unit,Y>& rhs) { - typedef typename divide_typeof_helper< X,quantity<unit<Dim,System>,Y> >::type type; + typedef typename divide_typeof_helper< X,quantity<Unit,Y> >::type type; return type::from_value(lhs/rhs.value()); } /// runtime unit times quantity template<class System1, - class System2, class Dim1, - class Dim2, + class Unit2, class Y> inline -typename multiply_typeof_helper< unit<Dim1,System1>,quantity<unit<Dim2,System2>,Y> >::type -operator*(const unit<Dim1,System1>&,const quantity<unit<Dim2,System2>,Y>& rhs) +typename multiply_typeof_helper< unit<Dim1,System1>,quantity<Unit2,Y> >::type +operator*(const unit<Dim1,System1>&,const quantity<Unit2,Y>& rhs) { - typedef typename multiply_typeof_helper< unit<Dim1,System1>,quantity<unit<Dim2,System2>,Y> >::type type; + typedef typename multiply_typeof_helper< unit<Dim1,System1>,quantity<Unit2,Y> >::type type; return type::from_value(rhs.value()); } /// runtime unit divided by quantity template<class System1, - class System2, class Dim1, - class Dim2, + class Unit2, class Y> inline -typename divide_typeof_helper< unit<Dim1,System1>,quantity<unit<Dim2,System2>,Y> >::type -operator/(const unit<Dim1,System1>&,const quantity<unit<Dim2,System2>,Y>& rhs) +typename divide_typeof_helper< unit<Dim1,System1>,quantity<Unit2,Y> >::type +operator/(const unit<Dim1,System1>&,const quantity<Unit2,Y>& rhs) { - typedef typename divide_typeof_helper< unit<Dim1,System1>,quantity<unit<Dim2,System2>,Y> >::type type; + typedef typename divide_typeof_helper< unit<Dim1,System1>,quantity<Unit2,Y> >::type type; return type::from_value(Y(1)/rhs.value()); } /// runtime quantity times unit -template<class System1, +template<class Unit1, class System2, - class Dim1, class Dim2, class Y> inline -typename multiply_typeof_helper< quantity<unit<Dim1,System1>,Y>,unit<Dim2,System2> >::type -operator*(const quantity<unit<Dim1,System1>,Y>& lhs,const unit<Dim2,System2>&) +typename multiply_typeof_helper< quantity<Unit1,Y>,unit<Dim2,System2> >::type +operator*(const quantity<Unit1,Y>& lhs,const unit<Dim2,System2>&) { - typedef typename multiply_typeof_helper< quantity<unit<Dim1,System1>,Y>,unit<Dim2,System2> >::type type; + typedef typename multiply_typeof_helper< quantity<Unit1,Y>,unit<Dim2,System2> >::type type; return type::from_value(lhs.value()); } /// runtime quantity divided by unit -template<class System1, +template<class Unit1, class System2, - class Dim1, class Dim2, class Y> inline -typename divide_typeof_helper< quantity<unit<Dim1,System1>,Y>,unit<Dim2,System2> >::type -operator/(const quantity<unit<Dim1,System1>,Y>& lhs,const unit<Dim2,System2>&) +typename divide_typeof_helper< quantity<Unit1,Y>,unit<Dim2,System2> >::type +operator/(const quantity<Unit1,Y>& lhs,const unit<Dim2,System2>&) { - typedef typename divide_typeof_helper< quantity<unit<Dim1,System1>,Y>,unit<Dim2,System2> >::type type; + typedef typename divide_typeof_helper< quantity<Unit1,Y>,unit<Dim2,System2> >::type type; return type::from_value(lhs.value()); } @@ -837,37 +829,33 @@ } /// runtime quantity times quantity -template<class System1, - class System2, - class Dim1, - class Dim2, +template<class Unit1, + class Unit2, class X, class Y> inline -typename multiply_typeof_helper< quantity<unit<Dim1,System1>,X>,quantity<unit<Dim2,System2>,Y> >::type -operator*(const quantity<unit<Dim1,System1>,X>& lhs, - const quantity<unit<Dim2,System2>,Y>& rhs) +typename multiply_typeof_helper< quantity<Unit1,X>,quantity<Unit2,Y> >::type +operator*(const quantity<Unit1,X>& lhs, + const quantity<Unit2,Y>& rhs) { - typedef typename multiply_typeof_helper< quantity<unit<Dim1,System1>,X>, - quantity<unit<Dim2,System2>,Y> >::type type; + typedef typename multiply_typeof_helper< quantity<Unit1,X>, + quantity<Unit2,Y> >::type type; return type::from_value(lhs.value()*rhs.value()); } /// runtime quantity divided by quantity -template<class System1, - class System2, - class Dim1, - class Dim2, +template<class Unit1, + class Unit2, class X, class Y> inline -typename divide_typeof_helper< quantity<unit<Dim1,System1>,X>,quantity<unit<Dim2,System2>,Y> >::type -operator/(const quantity<unit<Dim1,System1>,X>& lhs, - const quantity<unit<Dim2,System2>,Y>& rhs) +typename divide_typeof_helper< quantity<Unit1,X>,quantity<Unit2,Y> >::type +operator/(const quantity<Unit1,X>& lhs, + const quantity<Unit2,Y>& rhs) { - typedef typename divide_typeof_helper< quantity<unit<Dim1,System1>,X>, - quantity<unit<Dim2,System2>,Y> >::type type; + typedef typename divide_typeof_helper< quantity<Unit1,X>, + quantity<Unit2,Y> >::type type; return type::from_value(lhs.value()/rhs.value()); } |
|
From: Steven W. <ste...@us...> - 2007-04-13 01:39:23
|
Update of /cvsroot/boost-sandbox/boost-sandbox/libs/units/example In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32307/boost-sandbox/libs/units/example Modified Files: unit_example_4.cpp Log Message: updated expected output Index: unit_example_4.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/units/example/unit_example_4.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- unit_example_4.cpp 5 Apr 2007 21:56:15 -0000 1.9 +++ unit_example_4.cpp 13 Apr 2007 01:39:22 -0000 1.10 @@ -493,7 +493,7 @@ sstream2 << "T = 310 K" << std::endl; sstream2 << "n = " << 2.05835e-17 << " mol" << std::endl; #if BOOST_UNITS_HAS_TYPEOF - sstream2 << "R = 8.31447(+/-1.5e-05) m^2 kg s^(-2) K^(-1) mol^(-1)" << std::endl; + sstream2 << "R = 8.314472 (rel. unc. = " << 1.8e-6 << ") m^2 kg s^(-2) K^(-1) mol^(-1)" << std::endl; #else sstream2 << "no typeof" << std::endl; #endif // BOOST_UNITS_HAS_TYPEOF @@ -507,11 +507,12 @@ sstream2 << "Z = (1.5,-2) m^2 kg s^(-3) A^(-2)" << std::endl; sstream2 << "I*Z = (12.5,0) m^2 kg s^(-3) A^(-1)" << std::endl; sstream2 << std::endl; - sstream2 << "x+y-w = 0.48(+/-0.632772) m" << std::endl; - sstream2 << "w*x = 9.04(+/-0.904885) m^2" << std::endl; - sstream2 << "x/y = 0.666667(+/-0.149071) dimensionless" << std::endl; - sstream2 << "w*y^2/(u*x)^2 = 10.17(+/-3.52328) m^(-1)" << std::endl; - sstream2 << "w/(u*x)^(1/2) = 3.19612(+/-0.160431) dimensionless" << std::endl; + sstream2 << std::scientific << std::setprecision(1); + sstream2 << "x+y-w = 0.48 (rel. unc. = " << 1.3 << ") m" << std::endl; + sstream2 << "w*x = 9.04 (rel. unc. = " << 1.0e-1 << ") m^2" << std::endl; + sstream2 << "x/y = 0.6667 (rel. unc. = " << 2.2e-1 << ") dimensionless" << std::endl; + sstream2 << "w*y^2/(u*x)^2 = 10.17 (rel. unc. = " << 3.5e-1 << ") m^(-1)" << std::endl; + sstream2 << "w/(u*x)^(1/2) = 3.1961 (rel. unc. = " << 5.0e-2 << ") dimensionless" << std::endl; sstream2 << std::endl; std::string str1(sstream1.str()); |
|
From: Steven W. <ste...@us...> - 2007-04-13 01:38:45
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31563/boost-sandbox/boost/units/systems/si Modified Files: constants.hpp Log Message: remove std::setw Index: constants.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si/constants.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- constants.hpp 5 Apr 2007 21:08:54 -0000 1.2 +++ constants.hpp 13 Apr 2007 01:38:04 -0000 1.3 @@ -67,10 +67,10 @@ std::ostream& operator<<(std::ostream& os,const value_and_uncertainty<Y>& val) { boost::io::ios_precision_saver precision_saver(os); - boost::io::ios_width_saver width_saver(os); + //boost::io::ios_width_saver width_saver(os); boost::io::ios_flags_saver flags_saver(os); - os << std::setw(21); + //os << std::setw(21); if (val.uncertainty() > Y(0)) { @@ -88,7 +88,7 @@ os << " (rel. unc. = " << std::setprecision(1) - << std::setw(7) + //<< std::setw(7) << std::scientific << relative_uncertainty << ")"; } |
|
From: Steven W. <ste...@us...> - 2007-04-13 01:38:45
|
Update of /cvsroot/boost-sandbox/boost-sandbox/libs/units/example In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31901/boost-sandbox/libs/units/example Modified Files: measurement.hpp Log Message: remove std::setw Index: measurement.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/units/example/measurement.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- measurement.hpp 5 Apr 2007 21:09:34 -0000 1.3 +++ measurement.hpp 13 Apr 2007 01:38:40 -0000 1.4 @@ -313,10 +313,10 @@ std::ostream& operator<<(std::ostream& os,const measurement<Y>& val) { boost::io::ios_precision_saver precision_saver(os); - boost::io::ios_width_saver width_saver(os); + //boost::io::ios_width_saver width_saver(os); boost::io::ios_flags_saver flags_saver(os); - os << std::setw(21); + //os << std::setw(21); if (val.uncertainty() > Y(0)) { @@ -334,7 +334,7 @@ os << " (rel. unc. = " << std::setprecision(1) - << std::setw(7) + //<< std::setw(7) << std::scientific << relative_uncertainty << ")"; } |
|
From: Steven W. <ste...@us...> - 2007-04-13 01:16:55
|
Update of /cvsroot/boost-sandbox/boost-sandbox/libs/units/example In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23183/boost-sandbox/libs/units/example Modified Files: Jamfile.v2 Log Message: added third compile-fail for unit_example_15 Index: Jamfile.v2 =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/units/example/Jamfile.v2,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Jamfile.v2 30 Mar 2007 03:55:35 -0000 1.2 +++ Jamfile.v2 13 Apr 2007 01:16:53 -0000 1.3 @@ -7,7 +7,7 @@ # accomanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt -UNITS_REQUIREMENTS = <include>$(BOOST_ROOT) <include>../../.. ; +UNITS_REQUIREMENTS = <include>$(BOOST_ROOT) <include>../../.. <warnings>all ; import testing ; @@ -32,6 +32,7 @@ [ run unit_example_15.cpp : : : $(UNITS_REQUIREMENTS) : ] [ compile-fail unit_example_15.cpp : $(UNITS_REQUIREMENTS) <define>BOOST_UNITS_EXAMPLE_15_FAIL=1 : unit_example_15_fail_1 ] [ compile-fail unit_example_15.cpp : $(UNITS_REQUIREMENTS) <define>BOOST_UNITS_EXAMPLE_15_FAIL=2 : unit_example_15_fail_2 ] + [ compile-fail unit_example_15.cpp : $(UNITS_REQUIREMENTS) <define>BOOST_UNITS_EXAMPLE_15_FAIL=3 : unit_example_15_fail_3 ] [ run unit_example_16.cpp : : : $(UNITS_REQUIREMENTS) : ] [ run unit_example_17.cpp : : : $(UNITS_REQUIREMENTS) : ] [ run unit_example_18.cpp : : : $(UNITS_REQUIREMENTS) : ] |
|
From: Steven W. <ste...@us...> - 2007-04-13 01:15:40
|
Update of /cvsroot/boost-sandbox/boost-sandbox/libs/units/example In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22780/boost-sandbox/libs/units/example Modified Files: unit_example_15.cpp Log Message: suppress unused variable warnings Index: unit_example_15.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/units/example/unit_example_15.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- unit_example_15.cpp 11 Apr 2007 21:24:04 -0000 1.5 +++ unit_example_15.cpp 13 Apr 2007 01:15:39 -0000 1.6 @@ -64,6 +64,9 @@ } // namespace boost +template<class T> +void suppress_unused_variable_warning(T&) {} + int main(void) { using namespace boost::units; @@ -83,6 +86,12 @@ quantity<world_space_unit,vector> wsv3(wsv1); quantity<object_space_unit,vector> osv3(osv1); + suppress_unused_variable_warning(wsv2); + suppress_unused_variable_warning(osv2); + + suppress_unused_variable_warning(wsv3); + suppress_unused_variable_warning(osv3); + #if defined(BOOST_UNITS_EXAMPLE_15_FAIL) && BOOST_UNITS_EXAMPLE_15_FAIL == 1 // compile-time error if either of these is uncommented quantity<world_space_unit,vector> wsv4(osv1); @@ -105,6 +114,12 @@ world_space_vector wsv3(wsv1); object_space_vector osv3(osv1); + + suppress_unused_variable_warning(wsv2); + suppress_unused_variable_warning(osv2); + + suppress_unused_variable_warning(wsv3); + suppress_unused_variable_warning(osv3); #if defined(BOOST_UNITS_EXAMPLE_15_FAIL) && BOOST_UNITS_EXAMPLE_15_FAIL == 2 // compile-time error if either of these is uncommented @@ -130,6 +145,12 @@ world_space_vector_type wsv3(wsv1); object_space_vector_type osv3(osv1); + + suppress_unused_variable_warning(wsv2); + suppress_unused_variable_warning(osv2); + + suppress_unused_variable_warning(wsv3); + suppress_unused_variable_warning(osv3); #if defined(BOOST_UNITS_EXAMPLE_15_FAIL) && BOOST_UNITS_EXAMPLE_15_FAIL == 3 // compile-time error if either of these is uncommented because conversion is not defined |
|
From: Steven W. <ste...@us...> - 2007-04-13 01:06:32
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19164/boost-sandbox/boost/units Modified Files: quantity.hpp Log Message: Added layout compatibility check Index: quantity.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/quantity.hpp,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- quantity.hpp 11 Apr 2007 22:11:03 -0000 1.18 +++ quantity.hpp 13 Apr 2007 01:06:31 -0000 1.19 @@ -41,7 +41,9 @@ BOOST_STATIC_ASSERT((detail::check_system<system_type,dimension_type>::value == true)); quantity() : val_() { } - quantity(const this_type& source) : val_(source.val_) { } + quantity(const this_type& source) : val_(source.val_) { + BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); + } //~quantity() { } this_type& operator=(const this_type& source) @@ -56,6 +58,7 @@ quantity(const quantity<unit<dimension_type,system_type>,YY>& source) : val_(source.value()) { + BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); BOOST_STATIC_ASSERT((boost::is_convertible<YY, Y>::value == true)); } @@ -79,6 +82,7 @@ typename boost::disable_if<typename is_implicitly_convertible<unit<Dim2,System2>,unit_type>::type>::type* = 0) : val_(conversion_helper<quantity<unit<Dim2,System2>,YY>,this_type>::convert(source).value()) { + BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); BOOST_STATIC_ASSERT((boost::is_convertible<YY,Y>::value == true)); } @@ -88,6 +92,7 @@ typename boost::enable_if<typename is_implicitly_convertible<unit<Dim2,System2>,unit_type>::type>::type* = 0) : val_(conversion_helper<quantity<unit<Dim2,System2>,YY>,this_type>::convert(source).value()) { + BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); BOOST_STATIC_ASSERT((boost::is_convertible<YY,Y>::value == true)); } @@ -99,6 +104,7 @@ explicit quantity(const quantity<unit<Dim2,System2>,YY>& source) : val_(conversion_helper<quantity<unit<Dim2,System2>,YY>,this_type>::convert(source).value()) { + BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); BOOST_STATIC_ASSERT((boost::is_convertible<YY,Y>::value == true)); } @@ -159,9 +165,15 @@ typedef dimensionless_type dimension_type; typedef unit<dimension_type,system_type> unit_type; - quantity() : val_() { } - quantity(value_type val) : val_(val) { } ///< construction from raw @c value_type is allowed - quantity(const this_type& source) : val_(source.val_) { } + quantity() : val_() { + BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); + } + quantity(value_type val) : val_(val) { + BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); + } ///< construction from raw @c value_type is allowed + quantity(const this_type& source) : val_(source.val_) { + BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); + } //~quantity() { } this_type& operator=(const this_type& source) @@ -176,6 +188,7 @@ quantity(const quantity<unit<dimension_type,system_type>,YY>& source) : val_(source.value()) { + BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); BOOST_STATIC_ASSERT((boost::is_convertible<YY,Y>::value == true)); } @@ -194,14 +207,18 @@ template<class System2, class Y2> quantity(const quantity<unit<dimensionless_type,homogeneous_system<System2> >,Y2>& source) : val_(source.value()) - { } + { + BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); + } /// conversion between different unit systems is explicit when /// the units are not equivalent. template<class System2, class Y2> explicit quantity(const quantity<unit<dimensionless_type,System2>,Y2>& source) : val_(conversion_helper<quantity<unit<dimensionless_type,System2>,Y2>, this_type>::convert(source).value()) - { } + { + BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); + } /// implicit assignment between different unit systems is allowed template<class System2> @@ -215,7 +232,7 @@ /// implicit conversion to @c value_type is allowed operator value_type() const { return val_; } - value_type value() const { return val_; } ///< constant accessor to value + const value_type& value() const { return val_; } ///< constant accessor to value ///< can add a quantity of the same type if add_typeof_helper<value_type,value_type>::type is convertible to value_type this_type& operator+=(const this_type& source) { val_ += source.val_; return *this; } |
|
From: Steven W. <ste...@us...> - 2007-04-13 01:05:28
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18753/boost-sandbox/boost/units Modified Files: operators.hpp static_rational.hpp dimension.hpp dim.hpp Log Message: remove static_* Index: operators.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/operators.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- operators.hpp 3 Apr 2007 20:54:15 -0000 1.3 +++ operators.hpp 13 Apr 2007 01:05:28 -0000 1.4 @@ -15,38 +15,9 @@ #include <complex> #include <boost/static_assert.hpp> -#include <boost/version.hpp> #include <boost/type_traits/is_same.hpp> -#if (BOOST_VERSION >= 103400) - #define BOOST_UNITS_HAS_BOOST_TYPEOF 1 -#else - #define BOOST_UNITS_HAS_BOOST_TYPEOF 0 -#endif - -// uncomment this to test without Boost Typeof -//#undef BOOST_UNITS_HAS_BOOST_TYPEOF -//#define BOOST_UNITS_HAS_BOOST_TYPEOF 0 - -#if (BOOST_UNITS_HAS_BOOST_TYPEOF) - #include <boost/typeof/typeof.hpp> - #include <boost/typeof/std/complex.hpp> - #define BOOST_UNITS_HAS_TYPEOF 1 -#else - #if (__GNUC__ && __cplusplus && __GNUC__ >= 3) - #define BOOST_UNITS_HAS_TYPEOF 1 - #define BOOST_UNITS_HAS_GNU_TYPEOF 1 - #elif defined(__MWERKS__) - #define BOOST_UNITS_HAS_TYPEOF 1 - #define BOOST_UNITS_HAS_MWERKS_TYPEOF 1 - #else - #define BOOST_UNITS_HAS_TYPEOF 0 - #endif -#endif - -// uncomment this to test without typeof support at all -//#undef BOOST_UNITS_HAS_TYPEOF -//#define BOOST_UNITS_HAS_TYPEOF 0 +#include <boost/units/config.hpp> /// \file /// \brief Compile time operators and typeof helper classes. @@ -59,28 +30,7 @@ namespace boost { -namespace units { - -/// Compile time negate. -template<typename R> struct static_negate; - -/// Compile time add. -template<typename R1,typename R2> struct static_add; - -/// Compile time subtract. -template<typename R1,typename R2> struct static_subtract; - -/// Compile time multiply. -template<typename R1,typename R2> struct static_multiply; - -/// Compile time divide. -template<typename R1,typename R2> struct static_divide; - -/// Compile time power. -template<typename R1,typename R2> struct static_power; - -/// Compile time root. -template<typename R1,typename R2> struct static_root; +namespace units { #if BOOST_UNITS_HAS_TYPEOF @@ -151,14 +101,6 @@ #endif -//template<typename X> struct unary_plus_typeof_helper { typedef typeof(+X()) type; }; -//template<typename X> struct unary_minus_typeof_helper { typedef typeof(-X()) type; }; -// -//template<typename X,typename Y> struct add_typeof_helper { typedef typeof(X()+Y()) type; }; -//template<typename X,typename Y> struct subtract_typeof_helper { typedef typeof(X()-Y()) type; }; -//template<typename X,typename Y> struct multiply_typeof_helper { typedef typeof(X()*Y()) type; }; -//template<typename X,typename Y> struct divide_typeof_helper { typedef typeof(X()/Y()) type; }; - #else // BOOST_UNITS_HAS_TYPEOF template<typename X> struct unary_plus_typeof_helper { typedef X type; }; Index: static_rational.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/static_rational.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- static_rational.hpp 12 Apr 2007 00:39:12 -0000 1.5 +++ static_rational.hpp 13 Apr 2007 01:05:28 -0000 1.6 @@ -126,45 +126,6 @@ return T(N)/T(D); } -///// negate @c static_rational -//template<integer_type N,integer_type D> -//struct static_negate< static_rational<N,D> > -//{ -// typedef typename static_rational<-N,D>::type type; -//}; -// -///// add @c static_rational -//template<integer_type N1,integer_type D1, -// integer_type N2,integer_type D2> -//struct static_add< static_rational<N1,D1>,static_rational<N2,D2> > -//{ -// typedef typename static_rational<N1*D2+N2*D1,D1*D2>::type type; -//}; -// -///// subtract @c static_rational -//template<integer_type N1,integer_type D1, -// integer_type N2,integer_type D2> -//struct static_subtract< static_rational<N1,D1>,static_rational<N2,D2> > -//{ -// typedef typename static_rational<N1*D2-N2*D1,D1*D2>::type type; -//}; -// -///// multiply @c static_rational -//template<integer_type N1,integer_type D1, -// integer_type N2,integer_type D2> -//struct static_multiply< static_rational<N1,D1>,static_rational<N2,D2> > -//{ -// typedef typename static_rational<N1*N2,D1*D2>::type type; -//}; -// -///// divide @c static_rational -//template<integer_type N1,integer_type D1, -// integer_type N2,integer_type D2> -//struct static_divide< static_rational<N1,D1>,static_rational<N2,D2> > -//{ -// typedef typename static_rational<N1*D2,D1*N2>::type type; -//}; - /// raise @c int to a @c static_rational power template<long N,long D> struct power_typeof_helper<int,static_rational<N,D> > Index: dimension.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/dimension.hpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- dimension.hpp 12 Apr 2007 20:44:46 -0000 1.6 +++ dimension.hpp 13 Apr 2007 01:05:28 -0000 1.7 @@ -73,55 +73,6 @@ public mpl::true_ { }; -//// All the static_* metafunctions in this file assume -//// that their parameters are sorted dimension lists. -//// -//// should we static assert is_dimension_list here? -// -///// Negate dimension list. -//template<typename DL> -//struct static_negate -//{ -// typedef DL type; -//}; -// -///// Add two dimension list, only permitted if they are commensurate. -//template<typename DL1,typename DL2> -//struct static_add -//{ -// BOOST_STATIC_ASSERT((is_same<DL1,DL2>::value == true)); -// typedef DL1 type; -//}; -// -///// Subtract two dimension sequences, only permitted if they are commensurate. -//template<typename DL1,typename DL2> -//struct static_subtract -//{ -// BOOST_STATIC_ASSERT((is_same<DL1,DL2>::value == true)); -// typedef DL2 type; -//}; -// -///// Multiply two dimension sequences. -//template<typename DL1,typename DL2> -//struct static_multiply -//{ -// typedef typename detail::merge_dimensions<DL1,DL2>::type type; -//}; -// -///// Divide two dimension lists. -//template<typename DL1,typename DL2> -//struct static_divide -//{ -// typedef typename detail::merge_dimensions< -// DL1, -// typename detail::static_inverse_impl< -// mpl::size<DL2>::value -// >::template apply< -// typename mpl::begin<DL2>::type -// >::type -// >::type type; -//}; - /// Raise a dimension list to a scalar power. template<typename DL,typename Ex> struct static_power Index: dim.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/dim.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- dim.hpp 12 Apr 2007 00:39:12 -0000 1.2 +++ dim.hpp 13 Apr 2007 01:05:28 -0000 1.3 @@ -54,82 +54,6 @@ public mpl::true_ { }; -///// \brief Negate a @c dim. -///// -///// \detailed @c static_negate operation delegates to @c value_type. -//template<typename T,typename V> -//struct static_negate< dim<T,V> > -//{ -// typedef dim<T,typename static_negate<V>::type> type; -//}; -// -///// \brief Add two dims. -///// -///// \detailed -///// @c static_add operations on dim are only defined between dims having identical -///// @c tag_type. Operation delegates to @c value_type. -//template<typename T,typename V1,typename V2> -//struct static_add< dim<T,V1>,dim<T,V2> > -//{ -// typedef dim<T,typename static_add<V1,V2>::type> type; -//}; -// -///// \brief Subtract two dims. -///// -///// \detailed -///// @c static_subtract operations on dim are only defined between dims having identical -///// @c tag_type. Operation delegates to @c value_type. -//template<typename T,typename V1,typename V2> -//struct static_subtract< dim<T,V1>,dim<T,V2> > -//{ -// typedef dim<T,typename static_subtract<V1,V2>::type> type; -//}; -// -///// \brief Multiply a @c dim and a @c value_type. -///// -///// \detailed -///// @c static_multiply operations on @c dim are only defined between @c dim and -///// @c value_type or @c value_type and @c dim. Operation delegates to @c value_type. -//template<typename T,typename V,typename X> -//struct static_multiply< dim<T,V>,X > -//{ -// typedef dim<T,typename static_multiply<V,X>::type> type; -//}; -// -///// \brief Multipy a @c value_type and a @c dim. -///// -///// \detailed -///// @c static_multiply operations on @c dim are only defined between @c dim and -///// @c value_type or @c value_type and @c dim. Operation delegates to @c value_type. -//template<typename T,typename V,typename X> -//struct static_multiply< X,dim<T,V> > -//{ -// typedef dim<T,typename static_multiply<X,V>::type> type; -//}; -// -///// \brief Divide a @c dim by a @c value_type. -///// -///// \detailed -///// @c static_divide operations on dim are only defined between @c dim and @c value_type or -///// @c value_type and @c dim. Operation delegates to @c value_type. -//template<typename T,typename V,typename X> -//struct static_divide< dim<T,V>,X > -//{ -// typedef dim<T,typename static_divide<V,X>::type> type; -//}; -// -///// \brief Divide a @c value_type by a @c dim. -///// -///// \detailed -///// @c static_divide operations on dim are only defined between @c dim and @c value_type or -///// @c value_type and @c dim. Operation delegates to @c value_type, negating to account -///// for the resulting inverse unit tag. -//template<typename T,typename V,typename X> -//struct static_divide< X,dim<T,V> > -//{ -// typedef dim<T,typename static_negate<typename static_divide<X,V>::type>::type> type; -//}; - } // namespace units namespace mpl { |
|
From: Steven W. <ste...@us...> - 2007-04-13 00:51:35
|
Update of /cvsroot/boost-sandbox/boost-sandbox/libs/units/example In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12755/boost-sandbox/libs/units/example Modified Files: unit_example_8.cpp Log Message: suppress warnings Index: unit_example_8.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/units/example/unit_example_8.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- unit_example_8.cpp 16 Mar 2007 18:29:54 -0000 1.1.1.1 +++ unit_example_8.cpp 13 Apr 2007 00:51:35 -0000 1.2 @@ -77,11 +77,11 @@ static type value(const boost::math::quaternion<Y>& x) { - const static_rational<N,D> rat; + //const static_rational<N,D> rat; - const typename divide_typeof_helper<Y,Y>::type m = Y(rat.numerator())/Y(rat.denominator()); + //const typename divide_typeof_helper<Y,Y>::type m = Y(rat.numerator())/Y(rat.denominator()); - return boost::math::pow(x,m); + return boost::math::pow(x,static_cast<int>(N)); } }; @@ -96,11 +96,11 @@ static type value(const boost::math::quaternion<Y>& x) { - const static_rational<N,D> rat; + //const static_rational<N,D> rat; - const typename divide_typeof_helper<Y,Y>::type m = Y(rat.denominator())/Y(rat.numerator()); + //const typename divide_typeof_helper<Y,Y>::type m = Y(rat.denominator())/Y(rat.numerator()); - return boost::math::pow(x,m); + return boost::math::pow(x,static_cast<int>(D)); } }; //] |
|
From: Steven W. <ste...@us...> - 2007-04-13 00:47:57
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv11146/boost-sandbox/boost/units Added Files: config.hpp Log Message: typeof configuration and compiler checks --- NEW FILE: config.hpp --- // mcs::units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2007 Matthias Christian Schabel // Copyright (C) 2007 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_CONFIG_HPP #define BOOST_UNITS_CONFIG_HPP #include <boost/version.hpp> #include <boost/config.hpp> #if (BOOST_VERSION >= 103400) #define BOOST_UNITS_HAS_BOOST_TYPEOF 1 #else #define BOOST_UNITS_HAS_BOOST_TYPEOF 0 #endif // uncomment this to test without Boost Typeof //#undef BOOST_UNITS_HAS_BOOST_TYPEOF //#define BOOST_UNITS_HAS_BOOST_TYPEOF 0 #if (BOOST_UNITS_HAS_BOOST_TYPEOF) #include <boost/typeof/typeof.hpp> #include <boost/typeof/std/complex.hpp> #define BOOST_UNITS_HAS_TYPEOF 1 #else #if (__GNUC__ && __cplusplus && __GNUC__ >= 3) #define BOOST_UNITS_HAS_TYPEOF 1 #define BOOST_UNITS_HAS_GNU_TYPEOF 1 #elif defined(__MWERKS__) #define BOOST_UNITS_HAS_TYPEOF 1 #define BOOST_UNITS_HAS_MWERKS_TYPEOF 1 #else #define BOOST_UNITS_HAS_TYPEOF 0 #endif #endif // uncomment this to test without typeof support at all //#undef BOOST_UNITS_HAS_TYPEOF //#define BOOST_UNITS_HAS_TYPEOF 0 #ifndef BOOST_UNITS_NO_COMPILER_CHECK #ifdef BOOST_NO_MEMBER_TEMPLATES #error Boost.Units requires member template #endif #ifdef BOOST_NO_MEMBER_TEMPLATE_KEYWORD #error Boost.Units requires member template keyword #endif #ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION #error Boost.Units requires in class member initialization #endif #ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING #error Boost.Units requires function template partial ordering #endif #ifdef BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS #error Boost.Units requires explicit function template arguments #endif #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #error Boost.Units requires partial specialization #endif #endif #ifdef BOOST_UNITS_REQUIRE_LAYOUT_COMPATIBILITY #define BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(a, b) BOOST_STATIC_ASSERT((sizeof(a) == sizeof(b))) #else #define BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(a, b) ((void)0) #endif #endif |
|
From: Steven W. <ste...@us...> - 2007-04-12 20:44:47
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12657/boost-sandbox/boost/units Modified Files: dimension.hpp Log Message: BOOST_UNITS_REGISTER_BASE_DIMENSION should fully qualify all names Index: dimension.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/dimension.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- dimension.hpp 12 Apr 2007 00:39:12 -0000 1.5 +++ dimension.hpp 12 Apr 2007 20:44:46 -0000 1.6 @@ -168,16 +168,16 @@ /// each specialization must be separately instantiated in boost::units namespace to prevent duplication of tag values #define BOOST_UNITS_REGISTER_BASE_DIMENSION(name, N) \ template<> \ -struct base_dimension<N> : \ - public mpl::int_<N> \ +struct boost::units::base_dimension<N> : \ + public boost::mpl::int_<N> \ { \ - typedef base_dimension<N> this_type; \ - typedef mpl::int_<N> value; \ + typedef boost::units::base_dimension<N> this_type; \ + typedef boost::mpl::int_<N> value; \ \ - typedef make_dimension_list< mpl::list< dim< this_type,static_rational<1> > > >::type type; \ + typedef boost::units::make_dimension_list< boost::mpl::list< boost::units::dim< this_type,boost::units::static_rational<1> > > >::type type;\ }; \ \ -typedef base_dimension<N> name; \ +typedef boost::units::base_dimension<N> name /// A utility class for defining composite dimensions with integer powers. template<class DT1 = dimensionless_type,int E1 = 0, |