Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1975
Modified Files:
operators.hpp static_constant.hpp
Log Message:
minor fixes
Index: static_constant.hpp
===================================================================
RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/static_constant.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- static_constant.hpp 30 Mar 2007 18:56:46 -0000 1.2
+++ static_constant.hpp 3 Apr 2007 20:54:15 -0000 1.3
@@ -30,6 +30,8 @@
/// A convenience macro for static constants with auto
/// type deduction.
+#if BOOST_UNITS_HAS_TYPEOF
+
#if BOOST_UNITS_HAS_BOOST_TYPEOF
#define BOOST_UNITS_AUTO_STATIC_CONSTANT(name, value) \
@@ -46,6 +48,8 @@
#define BOOST_UNITS_AUTO_STATIC_CONSTANT(name, value) \
BOOST_UNITS_STATIC_CONSTANT(name, typeof(value))(value) \
-#endif
+#endif // BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#endif // BOOST_UNITS_HAS_TYPEOF
#endif // BOOST_UNITS_STATIC_CONSTANT_HPP
Index: operators.hpp
===================================================================
RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/operators.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- operators.hpp 3 Apr 2007 19:25:08 -0000 1.2
+++ operators.hpp 3 Apr 2007 20:54:15 -0000 1.3
@@ -91,7 +91,7 @@
} // namespace typeof_
-#if (BOOST_UNITS_HAS_TYPEOF && BOOST_UNITS_HAS_BOOST_TYPEOF)
+#if (BOOST_UNITS_HAS_BOOST_TYPEOF)
template<typename X> struct unary_plus_typeof_helper
{
@@ -129,7 +129,7 @@
typedef typename nested::type type;
};
-#elif (BOOST_UNITS_HAS_TYPEOF && BOOST_UNITS_HAS_MWERKS_TYPEOF)
+#elif (BOOST_UNITS_HAS_MWERKS_TYPEOF)
template<typename X> struct unary_plus_typeof_helper { typedef __typeof__((+typeof_::make<X>())) type; };
template<typename X> struct unary_minus_typeof_helper { typedef __typeof__((-typeof_::make<X>())) type; };
@@ -139,7 +139,7 @@
template<typename X,typename Y> struct multiply_typeof_helper { typedef __typeof__((typeof_::make<X>()*typeof_::make<Y>())) type; };
template<typename X,typename Y> struct divide_typeof_helper { typedef __typeof__((typeof_::make<X>()/typeof_::make<Y>())) type; };
-#elif (BOOST_UNITS_HAS_TYPEOF && BOOST_UNITS_HAS_GNU_TYPEOF)
+#elif (BOOST_UNITS_HAS_GNU_TYPEOF)
template<typename X> struct unary_plus_typeof_helper { typedef typeof((+typeof_::make<X>())) type; };
template<typename X> struct unary_minus_typeof_helper { typedef typeof((-typeof_::make<X>())) type; };
|