Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r55021 - trunk/libs/serialization/src
From: ramey_at_[hidden]
Date: 2009-07-18 15:15:20


Author: ramey
Date: 2009-07-18 15:15:20 EDT (Sat, 18 Jul 2009)
New Revision: 55021
URL: http://svn.boost.org/trac/boost/changeset/55021

Log:
Fix void_cast unregister - again!
Text files modified:
   trunk/libs/serialization/src/void_cast.cpp | 17 +++++++++++------
   1 files changed, 11 insertions(+), 6 deletions(-)

Modified: trunk/libs/serialization/src/void_cast.cpp
==============================================================================
--- trunk/libs/serialization/src/void_cast.cpp (original)
+++ trunk/libs/serialization/src/void_cast.cpp 2009-07-18 15:15:20 EDT (Sat, 18 Jul 2009)
@@ -223,12 +223,17 @@
     // delete all shortcuts which use this primitive
     void_cast_detail::set_type::iterator it;
     for(it = s.begin(); it != s.end();){
- // note item 9 from Effective STL !!!
- if( (*it)->m_base == m_base && m_derived == (*it)->m_derived
- || (*it)->m_base_observer.expired()
- || (*it)->m_derived_observer.expired()
- || *m_derived == *(*it)->m_base
- || *(*it)->m_derived == *m_base
+ if(
+ m_base == (*it)->m_base
+ && m_derived == (*it)->m_derived
+ ||
+ ! m_derived_observer.expired()
+ && ! (*it)->m_base_observer.expired()
+ && *m_derived == *(*it)->m_base
+ ||
+ ! m_base_observer.expired()
+ && ! (*it)->m_derived_observer.expired()
+ && *(*it)->m_derived == *m_base
         ){
             // since recursion could invalidate it
             const void_caster * vc = *it;


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