mirror of
https://github.com/boostorg/smart_ptr.git
synced 2025-07-29 20:37:13 +02:00
SmartPtr: Remove obsolete MSVC version checks.
[SVN r85929]
This commit is contained in:
@ -148,18 +148,11 @@ public:
|
||||
#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)
|
||||
#endif
|
||||
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
|
||||
, id_(shared_count_id)
|
||||
#endif
|
||||
{
|
||||
#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, <= 1200 )
|
||||
typedef Y* P;
|
||||
#endif
|
||||
#ifndef BOOST_NO_EXCEPTIONS
|
||||
|
||||
try
|
||||
|
@ -80,19 +80,7 @@ public:
|
||||
{
|
||||
long tmp = static_cast< long const volatile& >( use_count_ );
|
||||
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;
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
#define BOOST_COMPILER_FENCE __memory_barrier();
|
||||
|
||||
#elif defined( _MSC_VER ) && _MSC_VER >= 1310
|
||||
#elif defined( _MSC_VER )
|
||||
|
||||
extern "C" void _ReadWriteBarrier();
|
||||
#pragma intrinsic( _ReadWriteBarrier )
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
// 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();
|
||||
#pragma intrinsic( _mm_pause )
|
||||
|
@ -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
|
||||
#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)
|
||||
# endif
|
||||
{
|
||||
os << p.get();
|
||||
return os;
|
||||
|
@ -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
|
||||
#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)
|
||||
# endif
|
||||
{
|
||||
os << p.get();
|
||||
return os;
|
||||
|
@ -136,8 +136,6 @@ public:
|
||||
boost::detail::sp_assert_convertible< Y, T >();
|
||||
}
|
||||
|
||||
#if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1300)
|
||||
|
||||
template<class Y>
|
||||
weak_ptr & operator=( weak_ptr<Y> const & r ) BOOST_NOEXCEPT
|
||||
{
|
||||
@ -171,8 +169,6 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
shared_ptr<T> lock() const BOOST_NOEXCEPT
|
||||
{
|
||||
return shared_ptr<T>( *this, boost::detail::sp_nothrow_tag() );
|
||||
|
Reference in New Issue
Block a user