SmartPtr: Remove obsolete MSVC version checks.

[SVN r85929]
This commit is contained in:
Stephen Kelly
2013-09-26 09:39:50 +00:00
parent 0dc1faa6d3
commit 7d1c527ac0
7 changed files with 2 additions and 37 deletions

View File

@ -148,18 +148,11 @@ public:
#endif #endif
} }
#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, <= 1200 )
template<class Y, class D> shared_count( Y * p, D d ): pi_(0)
#else
template<class P, class D> shared_count( P p, D d ): pi_(0) template<class P, class D> shared_count( P p, D d ): pi_(0)
#endif
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
, id_(shared_count_id) , id_(shared_count_id)
#endif #endif
{ {
#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, <= 1200 )
typedef Y* P;
#endif
#ifndef BOOST_NO_EXCEPTIONS #ifndef BOOST_NO_EXCEPTIONS
try try

View File

@ -80,19 +80,7 @@ public:
{ {
long tmp = static_cast< long const volatile& >( use_count_ ); long tmp = static_cast< long const volatile& >( use_count_ );
if( tmp == 0 ) return false; if( tmp == 0 ) return false;
#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, == 1200 )
// work around a code generation bug
long tmp2 = tmp + 1;
if( BOOST_INTERLOCKED_COMPARE_EXCHANGE( &use_count_, tmp2, tmp ) == tmp2 - 1 ) return true;
#else
if( BOOST_INTERLOCKED_COMPARE_EXCHANGE( &use_count_, tmp + 1, tmp ) == tmp ) return true; if( BOOST_INTERLOCKED_COMPARE_EXCHANGE( &use_count_, tmp + 1, tmp ) == tmp ) return true;
#endif
} }
} }

View File

@ -24,7 +24,7 @@
#define BOOST_COMPILER_FENCE __memory_barrier(); #define BOOST_COMPILER_FENCE __memory_barrier();
#elif defined( _MSC_VER ) && _MSC_VER >= 1310 #elif defined( _MSC_VER )
extern "C" void _ReadWriteBarrier(); extern "C" void _ReadWriteBarrier();
#pragma intrinsic( _ReadWriteBarrier ) #pragma intrinsic( _ReadWriteBarrier )

View File

@ -27,7 +27,7 @@
// BOOST_SMT_PAUSE // BOOST_SMT_PAUSE
#if defined(_MSC_VER) && _MSC_VER >= 1310 && ( defined(_M_IX86) || defined(_M_X64) ) #if defined(_MSC_VER) && ( defined(_M_IX86) || defined(_M_X64) )
extern "C" void _mm_pause(); extern "C" void _mm_pause();
#pragma intrinsic( _mm_pause ) #pragma intrinsic( _mm_pause )

View File

@ -292,13 +292,7 @@ template<class Y> std::ostream & operator<< (std::ostream & os, intrusive_ptr<Y>
// in STLport's no-iostreams mode no iostream symbols can be used // in STLport's no-iostreams mode no iostream symbols can be used
#ifndef _STLP_NO_IOSTREAMS #ifndef _STLP_NO_IOSTREAMS
# if defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, < 1300 && __SGI_STL_PORT)
// MSVC6 has problems finding std::basic_ostream through the using declaration in namespace _STL
using std::basic_ostream;
template<class E, class T, class Y> basic_ostream<E, T> & operator<< (basic_ostream<E, T> & os, intrusive_ptr<Y> const & p)
# else
template<class E, class T, class Y> std::basic_ostream<E, T> & operator<< (std::basic_ostream<E, T> & os, intrusive_ptr<Y> const & p) template<class E, class T, class Y> std::basic_ostream<E, T> & operator<< (std::basic_ostream<E, T> & os, intrusive_ptr<Y> const & p)
# endif
{ {
os << p.get(); os << p.get();
return os; return os;

View File

@ -849,13 +849,7 @@ template<class Y> std::ostream & operator<< (std::ostream & os, shared_ptr<Y> co
// in STLport's no-iostreams mode no iostream symbols can be used // in STLport's no-iostreams mode no iostream symbols can be used
#ifndef _STLP_NO_IOSTREAMS #ifndef _STLP_NO_IOSTREAMS
# if defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, < 1300 && __SGI_STL_PORT)
// MSVC6 has problems finding std::basic_ostream through the using declaration in namespace _STL
using std::basic_ostream;
template<class E, class T, class Y> basic_ostream<E, T> & operator<< (basic_ostream<E, T> & os, shared_ptr<Y> const & p)
# else
template<class E, class T, class Y> std::basic_ostream<E, T> & operator<< (std::basic_ostream<E, T> & os, shared_ptr<Y> const & p) template<class E, class T, class Y> std::basic_ostream<E, T> & operator<< (std::basic_ostream<E, T> & os, shared_ptr<Y> const & p)
# endif
{ {
os << p.get(); os << p.get();
return os; return os;

View File

@ -136,8 +136,6 @@ public:
boost::detail::sp_assert_convertible< Y, T >(); boost::detail::sp_assert_convertible< Y, T >();
} }
#if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1300)
template<class Y> template<class Y>
weak_ptr & operator=( weak_ptr<Y> const & r ) BOOST_NOEXCEPT weak_ptr & operator=( weak_ptr<Y> const & r ) BOOST_NOEXCEPT
{ {
@ -171,8 +169,6 @@ public:
return *this; return *this;
} }
#endif
shared_ptr<T> lock() const BOOST_NOEXCEPT shared_ptr<T> lock() const BOOST_NOEXCEPT
{ {
return shared_ptr<T>( *this, boost::detail::sp_nothrow_tag() ); return shared_ptr<T>( *this, boost::detail::sp_nothrow_tag() );