Boost logo

Boost-Commit :

From: NielsDekker_at_[hidden]
Date: 2007-09-16 05:33:35


Author: niels_dekker
Date: 2007-09-16 05:33:34 EDT (Sun, 16 Sep 2007)
New Revision: 39308
URL: http://svn.boost.org/trac/boost/changeset/39308

Log:
Visual C++ 7.1 ICE workaround by Ralf W. Grosse-Kunstleve added to ~const_T_base() as well. See also Boost Developers mailing list, subject "utility/value_init.hpp: VC 7.1 ICE & workaround"
Text files modified:
   trunk/boost/utility/value_init.hpp | 6 +++++-
   1 files changed, 5 insertions(+), 1 deletions(-)

Modified: trunk/boost/utility/value_init.hpp
==============================================================================
--- trunk/boost/utility/value_init.hpp (original)
+++ trunk/boost/utility/value_init.hpp 2007-09-16 05:33:34 EDT (Sun, 16 Sep 2007)
@@ -46,7 +46,11 @@
       new (&x) T();
     }
 
- ~const_T_base() { get().T::~T(); }
+ ~const_T_base()
+ {
+ void const * ptr = &x;
+ static_cast<T*>(ptr)->T::~T();
+ }
 
     T & get() const
     {


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