Boost logo

Boost-Commit :

From: rwgk_at_[hidden]
Date: 2007-09-15 19:11:55


Author: rwgk
Date: 2007-09-15 19:11:50 EDT (Sat, 15 Sep 2007)
New Revision: 39302
URL: http://svn.boost.org/trac/boost/changeset/39302

Log:
work around Visual C++ 7.1 internal compiler error
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-15 19:11:50 EDT (Sat, 15 Sep 2007)
@@ -69,7 +69,11 @@
       new (&x) T();
     }
 
- ~non_const_T_base() { get().T::~T(); }
+ ~non_const_T_base()
+ {
+ void * 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