Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r52007 - trunk/boost/interprocess/detail
From: igaztanaga_at_[hidden]
Date: 2009-03-27 04:49:57


Author: igaztanaga
Date: 2009-03-27 04:49:56 EDT (Fri, 27 Mar 2009)
New Revision: 52007
URL: http://svn.boost.org/trac/boost/changeset/52007

Log:
Change static_cast with reinterpret_cast since in some compilers (Intel, and surely other EDG based ones) this kicks the conversion operator recursively and provokes an stack overflow.
Text files modified:
   trunk/boost/interprocess/detail/move.hpp | 4 ++--
   1 files changed, 2 insertions(+), 2 deletions(-)

Modified: trunk/boost/interprocess/detail/move.hpp
==============================================================================
--- trunk/boost/interprocess/detail/move.hpp (original)
+++ trunk/boost/interprocess/detail/move.hpp 2009-03-27 04:49:56 EDT (Fri, 27 Mar 2009)
@@ -133,7 +133,7 @@
 template <class T>
 typename enable_if<is_movable<T>, rv<T>&>::type move(T& x)
 {
- return static_cast<rv<T>& >(x);
+ return reinterpret_cast<rv<T>& >(x);
 }
 
 template <class T>
@@ -184,7 +184,7 @@
 //////////////////////////////////////////////////////////////////////////////
 #define BOOST_INTERPROCESS_ENABLE_MOVE_EMULATION(TYPE)\
    operator boost::interprocess::rv<TYPE>&() \
- { return static_cast<boost::interprocess::rv<TYPE>& >(*this); }\
+ { return reinterpret_cast<boost::interprocess::rv<TYPE>& >(*this); }\
 //
 
 


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