|
Boost-Commit : |
From: pdimov_at_[hidden]
Date: 2008-05-03 15:43:52
Author: pdimov
Date: 2008-05-03 15:43:52 EDT (Sat, 03 May 2008)
New Revision: 45086
URL: http://svn.boost.org/trac/boost/changeset/45086
Log:
More fixes for MSVC 6.0.
Text files modified:
trunk/boost/shared_ptr.hpp | 25 ++++++++++++++++++-------
1 files changed, 18 insertions(+), 7 deletions(-)
Modified: trunk/boost/shared_ptr.hpp
==============================================================================
--- trunk/boost/shared_ptr.hpp (original)
+++ trunk/boost/shared_ptr.hpp 2008-05-03 15:43:52 EDT (Sat, 03 May 2008)
@@ -740,7 +740,11 @@
detail::shared_count().swap( _deleter );
}
template<typename D>
+#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, < 1300 )
+ D* get_deleter( D* ) const
+#else
D* get_deleter() const
+#endif
{
return boost::detail::basic_get_deleter<D>(_deleter);
}
@@ -752,18 +756,25 @@
{
D *del = detail::basic_get_deleter<D>( p.get_shared_count() );
-#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, < 1300 )
-#else
-
if( del == 0 )
{
detail::sp_deleter_wrapper *del_wrapper = detail::basic_get_deleter<detail::sp_deleter_wrapper>(p.get_shared_count());
-// The following get_deleter method call is fully qualified because
-// older versions of gcc (2.95, 3.2.3) fail to compile it when written del_wrapper->get_deleter<D>()
- if(del_wrapper) del = del_wrapper->::boost::detail::sp_deleter_wrapper::get_deleter<D>();
- }
+
+#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, < 1300 )
+
+ if( del_wrapper ) del = del_wrapper->get_deleter( (D*)0 );
+
+#elif defined( __GNUC__ ) && BOOST_WORKAROUND( __GNUC__, < 4 )
+
+ if( del_wrapper ) del = del_wrapper->::boost::detail::sp_deleter_wrapper::get_deleter<D>();
+
+#else
+
+ if( del_wrapper ) del = del_wrapper->get_deleter<D>();
#endif
+ }
+
return del;
}
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