Boost logo

Boost-Commit :

From: steven_at_[hidden]
Date: 2008-06-27 23:44:22


Author: steven_watanabe
Date: 2008-06-27 23:44:22 EDT (Fri, 27 Jun 2008)
New Revision: 46801
URL: http://svn.boost.org/trac/boost/changeset/46801

Log:
Make the fail_add_assign and fail_sub_assign tests pass on sun
Text files modified:
   trunk/boost/units/unit.hpp | 21 +++++++--------------
   1 files changed, 7 insertions(+), 14 deletions(-)

Modified: trunk/boost/units/unit.hpp
==============================================================================
--- trunk/boost/units/unit.hpp (original)
+++ trunk/boost/units/unit.hpp 2008-06-27 23:44:22 EDT (Fri, 27 Jun 2008)
@@ -13,6 +13,7 @@
 
 #include <boost/static_assert.hpp>
 #include <boost/mpl/bool.hpp>
+#include <boost/mpl/assert.hpp>
 #include <boost/type_traits/is_same.hpp>
 
 #include <boost/units/config.hpp>
@@ -105,28 +106,20 @@
 
 /// unit add typeof helper
 /// INTERNAL ONLY
-template<class Dim1,
- class Dim2,
+template<class Dim,
          class System>
-struct add_typeof_helper< unit<Dim1,System>,unit<Dim2,System> >
+struct add_typeof_helper< unit<Dim,System>,unit<Dim,System> >
 {
- // ensure dimension lists are commensurate
- BOOST_STATIC_ASSERT((is_same<Dim1,Dim2>::value == true));
-
- typedef unit<Dim1,System> type;
+ typedef unit<Dim,System> type;
 };
 
 /// unit subtract typeof helper
 /// INTERNAL ONLY
-template<class Dim1,
- class Dim2,
+template<class Dim,
          class System>
-struct subtract_typeof_helper< unit<Dim1,System>,unit<Dim2,System> >
+struct subtract_typeof_helper< unit<Dim,System>,unit<Dim,System> >
 {
- // ensure dimension lists are commensurate
- BOOST_STATIC_ASSERT((is_same<Dim1,Dim2>::value == true));
-
- typedef unit<Dim1,System> type;
+ typedef unit<Dim,System> type;
 };
 
 /// unit multiply typeof helper for two identical homogeneous systems


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk