Boost logo

Boost-Commit :

From: steven_at_[hidden]
Date: 2008-06-28 16:33:53


Author: steven_watanabe
Date: 2008-06-28 16:33:53 EDT (Sat, 28 Jun 2008)
New Revision: 46827
URL: http://svn.boost.org/trac/boost/changeset/46827

Log:
Added a couple of comments describing the sun workarounds
Text files modified:
   trunk/boost/units/quantity.hpp | 3 +++
   trunk/boost/units/unit.hpp | 4 ++++
   2 files changed, 7 insertions(+), 0 deletions(-)

Modified: trunk/boost/units/quantity.hpp
==============================================================================
--- trunk/boost/units/quantity.hpp (original)
+++ trunk/boost/units/quantity.hpp 2008-06-28 16:33:53 EDT (Sat, 28 Jun 2008)
@@ -107,6 +107,9 @@
             BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y);
         }
         
+ // Need to make sure that the destructor of
+ // Unit which contains the checking is instantiated,
+ // on sun.
         #ifdef __SUNPRO_CC
         ~quantity() {
             unit_type force_unit_instantiation;

Modified: trunk/boost/units/unit.hpp
==============================================================================
--- trunk/boost/units/unit.hpp (original)
+++ trunk/boost/units/unit.hpp 2008-06-28 16:33:53 EDT (Sat, 28 Jun 2008)
@@ -48,6 +48,10 @@
        
         this_type& operator=(const this_type&) { }
         
+ // sun will ignore errors resulting from templates
+ // instantiated in the return type of a function.
+ // Make sure that we get an error anyway by putting.
+ // the check in the destructor.
         #ifdef __SUNPRO_CC
         ~unit() {
             BOOST_MPL_ASSERT((detail::check_system<System, Dim>));


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