Boost logo

Boost-Commit :

From: pdimov_at_[hidden]
Date: 2008-05-06 14:58:16


Author: pdimov
Date: 2008-05-06 14:58:15 EDT (Tue, 06 May 2008)
New Revision: 45177
URL: http://svn.boost.org/trac/boost/changeset/45177

Log:
Fix g++ 3.2 regression.
Text files modified:
   trunk/boost/detail/sp_convertible.hpp | 12 ++++++++++++
   trunk/boost/intrusive_ptr.hpp | 5 +----
   trunk/boost/shared_ptr.hpp | 5 +----
   trunk/boost/weak_ptr.hpp | 4 ++--
   4 files changed, 16 insertions(+), 10 deletions(-)

Modified: trunk/boost/detail/sp_convertible.hpp
==============================================================================
--- trunk/boost/detail/sp_convertible.hpp (original)
+++ trunk/boost/detail/sp_convertible.hpp 2008-05-06 14:58:15 EDT (Tue, 06 May 2008)
@@ -17,6 +17,16 @@
 
 #include <boost/config.hpp>
 
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) && defined( BOOST_NO_SFINAE )
+# define BOOST_SP_NO_SP_CONVERTIBLE
+#endif
+
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) && defined( __GNUC__ ) && ( __GNUC__ * 100 + __GNUC_MINOR__ < 303 )
+# define BOOST_SP_NO_SP_CONVERTIBLE
+#endif
+
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
+
 namespace boost
 {
 
@@ -57,4 +67,6 @@
 
 } // namespace boost
 
+#endif // !defined( BOOST_SP_NO_SP_CONVERTIBLE )
+
 #endif // #ifndef BOOST_DETAIL_SP_TYPEINFO_HPP_INCLUDED

Modified: trunk/boost/intrusive_ptr.hpp
==============================================================================
--- trunk/boost/intrusive_ptr.hpp (original)
+++ trunk/boost/intrusive_ptr.hpp 2008-05-06 14:58:15 EDT (Tue, 06 May 2008)
@@ -22,10 +22,7 @@
 
 #include <boost/assert.hpp>
 #include <boost/detail/workaround.hpp>
-
-#if !defined( BOOST_NO_SFINAE )
 #include <boost/detail/sp_convertible.hpp>
-#endif
 
 #include <functional> // for std::less
 
@@ -78,7 +75,7 @@
 #if !defined(BOOST_NO_MEMBER_TEMPLATES) || defined(BOOST_MSVC6_MEMBER_TEMPLATES)
 
     template<class U>
-#if !defined( BOOST_NO_SFINAE )
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
 
     intrusive_ptr( intrusive_ptr<U> const & rhs, typename detail::sp_enable_if_convertible<U,T>::type = detail::sp_empty() )
 

Modified: trunk/boost/shared_ptr.hpp
==============================================================================
--- trunk/boost/shared_ptr.hpp (original)
+++ trunk/boost/shared_ptr.hpp 2008-05-06 14:58:15 EDT (Tue, 06 May 2008)
@@ -31,10 +31,7 @@
 #include <boost/throw_exception.hpp>
 #include <boost/detail/shared_count.hpp>
 #include <boost/detail/workaround.hpp>
-
-#if !defined( BOOST_NO_SFINAE )
 #include <boost/detail/sp_convertible.hpp>
-#endif
 
 #if !defined(BOOST_SP_NO_ATOMIC_ACCESS)
 #include <boost/detail/spinlock_pool.hpp>
@@ -228,7 +225,7 @@
     }
 
     template<class Y>
-#if !defined( BOOST_NO_SFINAE )
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
 
     shared_ptr( shared_ptr<Y> const & r, typename detail::sp_enable_if_convertible<Y,T>::type = detail::sp_empty() )
 

Modified: trunk/boost/weak_ptr.hpp
==============================================================================
--- trunk/boost/weak_ptr.hpp (original)
+++ trunk/boost/weak_ptr.hpp 2008-05-06 14:58:15 EDT (Tue, 06 May 2008)
@@ -61,7 +61,7 @@
 //
 
     template<class Y>
-#if !defined( BOOST_NO_SFINAE )
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
 
     weak_ptr( weak_ptr<Y> const & r, typename detail::sp_enable_if_convertible<Y,T>::type = detail::sp_empty() )
 
@@ -76,7 +76,7 @@
     }
 
     template<class Y>
-#if !defined( BOOST_NO_SFINAE )
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
 
     weak_ptr( shared_ptr<Y> const & r, typename detail::sp_enable_if_convertible<Y,T>::type = detail::sp_empty() )
 


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