|
From: Steven W. <ste...@us...> - 2007-04-04 19:17:46
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16375/boost-sandbox/boost/units Modified Files: static_constant.hpp Log Message: Changed AUTO_STATIC_CONSTANT to use auto x = v instead of auto x(v) so it will never be parsed as a function declaration Index: static_constant.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/static_constant.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- static_constant.hpp 3 Apr 2007 20:54:15 -0000 1.3 +++ static_constant.hpp 4 Apr 2007 19:17:46 -0000 1.4 @@ -26,7 +26,7 @@ } \ \ template<bool b> \ -const type name##_instance_t<b>::instance \ +const type name##_instance_t<b>::instance /// A convenience macro for static constants with auto /// type deduction. @@ -36,17 +36,17 @@ #define BOOST_UNITS_AUTO_STATIC_CONSTANT(name, value) \ BOOST_TYPEOF_NESTED_TYPEDEF(name##_nested_t, value) \ -BOOST_UNITS_STATIC_CONSTANT(name, name##_nested_t::type)(value) \ +BOOST_UNITS_STATIC_CONSTANT(name, name##_nested_t::type) = (value) #elif BOOST_UNITS_HAS_MWERKS_TYPEOF #define BOOST_UNITS_AUTO_STATIC_CONSTANT(name, value) \ -BOOST_UNITS_STATIC_CONSTANT(name, __typeof__(value))(value) \ +BOOST_UNITS_STATIC_CONSTANT(name, __typeof__(value)) = (value) #elif BOOST_UNITS_HAS_GNU_TYPEOF #define BOOST_UNITS_AUTO_STATIC_CONSTANT(name, value) \ -BOOST_UNITS_STATIC_CONSTANT(name, typeof(value))(value) \ +BOOST_UNITS_STATIC_CONSTANT(name, typeof(value)) = (value) #endif // BOOST_UNITS_HAS_BOOST_TYPEOF |