|
Boost-Commit : |
From: steven_at_[hidden]
Date: 2008-06-28 15:18:02
Author: steven_watanabe
Date: 2008-06-28 15:18:01 EDT (Sat, 28 Jun 2008)
New Revision: 46820
URL: http://svn.boost.org/trac/boost/changeset/46820
Log:
Move checking to destructors on sun so that it won't get ignored
Text files modified:
trunk/boost/units/quantity.hpp | 6 ++++++
trunk/boost/units/unit.hpp | 11 +++++++++--
2 files changed, 15 insertions(+), 2 deletions(-)
Modified: trunk/boost/units/quantity.hpp
==============================================================================
--- trunk/boost/units/quantity.hpp (original)
+++ trunk/boost/units/quantity.hpp 2008-06-28 15:18:01 EDT (Sat, 28 Jun 2008)
@@ -107,6 +107,12 @@
BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y);
}
+ #ifdef __SUNPRO_CC
+ ~quantity() {
+ unit_type force_unit_instantiation;
+ }
+ #endif
+
//~quantity() { }
this_type& operator=(const this_type& source)
Modified: trunk/boost/units/unit.hpp
==============================================================================
--- trunk/boost/units/unit.hpp (original)
+++ trunk/boost/units/unit.hpp 2008-06-28 15:18:01 EDT (Sat, 28 Jun 2008)
@@ -48,9 +48,16 @@
this_type& operator=(const this_type&) { }
+ #ifdef __SUNPRO_CC
+ ~unit() {
+ BOOST_MPL_ASSERT((detail::check_system<System, Dim>));
+ BOOST_MPL_ASSERT((is_dimension_list<Dim>));
+ }
+ #else
private:
- BOOST_STATIC_ASSERT((detail::check_system<System, Dim>::value == true));
- BOOST_STATIC_ASSERT((is_dimension_list<Dim>::value == true));
+ BOOST_MPL_ASSERT((detail::check_system<System, Dim>));
+ BOOST_MPL_ASSERT((is_dimension_list<Dim>));
+ #endif
};
}
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