mirror of
https://github.com/boostorg/smart_ptr.git
synced 2025-08-02 14:14:27 +02:00
Remove obsolete uses of BOOST_MSVC
This commit is contained in:
@@ -1,12 +1,3 @@
|
|||||||
#include <boost/config.hpp>
|
|
||||||
|
|
||||||
#if defined(BOOST_MSVC)
|
|
||||||
#pragma warning(disable: 4786) // identifier truncated in debug info
|
|
||||||
#pragma warning(disable: 4710) // function not inlined
|
|
||||||
#pragma warning(disable: 4711) // function selected for automatic inline expansion
|
|
||||||
#pragma warning(disable: 4514) // unreferenced inline removed
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// shared_ptr_mt_test.cpp - tests shared_ptr with multiple threads
|
// shared_ptr_mt_test.cpp - tests shared_ptr with multiple threads
|
||||||
//
|
//
|
||||||
// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
|
// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
|
||||||
@@ -18,14 +9,14 @@
|
|||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <boost/bind.hpp>
|
#include <boost/bind.hpp>
|
||||||
|
#include <boost/config.hpp>
|
||||||
|
|
||||||
|
#include <boost/smart_ptr/detail/lightweight_thread.hpp>
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
|
|
||||||
#include <boost/detail/lightweight_thread.hpp>
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
||||||
int const n = 1024 * 1024;
|
int const n = 1024 * 1024;
|
||||||
|
@@ -1,12 +1,3 @@
|
|||||||
#include <boost/config.hpp>
|
|
||||||
|
|
||||||
#if defined(BOOST_MSVC)
|
|
||||||
#pragma warning(disable: 4786) // identifier truncated in debug info
|
|
||||||
#pragma warning(disable: 4710) // function not inlined
|
|
||||||
#pragma warning(disable: 4711) // function selected for automatic inline expansion
|
|
||||||
#pragma warning(disable: 4514) // unreferenced inline removed
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// shared_ptr_timing_test.cpp - use to evaluate the impact of thread safety
|
// shared_ptr_timing_test.cpp - use to evaluate the impact of thread safety
|
||||||
//
|
//
|
||||||
|
@@ -1,12 +1,3 @@
|
|||||||
#include <boost/config.hpp>
|
|
||||||
|
|
||||||
#if defined(BOOST_MSVC)
|
|
||||||
#pragma warning(disable: 4786) // identifier truncated in debug info
|
|
||||||
#pragma warning(disable: 4710) // function not inlined
|
|
||||||
#pragma warning(disable: 4711) // function selected for automatic inline expansion
|
|
||||||
#pragma warning(disable: 4514) // unreferenced inline removed
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// weak_ptr_mt_test.cpp
|
// weak_ptr_mt_test.cpp
|
||||||
//
|
//
|
||||||
// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
|
// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
|
||||||
@@ -19,15 +10,15 @@
|
|||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <boost/weak_ptr.hpp>
|
#include <boost/weak_ptr.hpp>
|
||||||
#include <boost/bind.hpp>
|
#include <boost/bind.hpp>
|
||||||
|
#include <boost/config.hpp>
|
||||||
|
|
||||||
|
#include <boost/smart_ptr/detail/lightweight_thread.hpp>
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
#include <boost/detail/lightweight_thread.hpp>
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
||||||
int const n = 16384;
|
int const n = 16384;
|
||||||
|
@@ -1,12 +1,3 @@
|
|||||||
#include <boost/config.hpp>
|
|
||||||
|
|
||||||
#if defined(BOOST_MSVC)
|
|
||||||
#pragma warning(disable: 4786) // identifier truncated in debug info
|
|
||||||
#pragma warning(disable: 4710) // function not inlined
|
|
||||||
#pragma warning(disable: 4711) // function selected for automatic inline expansion
|
|
||||||
#pragma warning(disable: 4514) // unreferenced inline removed
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// weak_ptr_timing_test.cpp
|
// weak_ptr_timing_test.cpp
|
||||||
//
|
//
|
||||||
@@ -20,6 +11,7 @@
|
|||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <boost/weak_ptr.hpp>
|
#include <boost/weak_ptr.hpp>
|
||||||
|
#include <boost/config.hpp>
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
@@ -164,18 +164,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
|
||||||
|
@@ -90,18 +90,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_SP_INTERLOCKED_COMPARE_EXCHANGE( &use_count_, tmp2, tmp ) == tmp2 - 1 ) return true;
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
if( BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE( &use_count_, tmp + 1, tmp ) == tmp ) return true;
|
if( BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE( &use_count_, tmp + 1, tmp ) == tmp ) return true;
|
||||||
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -140,8 +140,6 @@ public:
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1400)
|
|
||||||
|
|
||||||
template<class Y>
|
template<class Y>
|
||||||
shared_array & operator=( shared_array<Y> const & r ) BOOST_SP_NOEXCEPT
|
shared_array & operator=( shared_array<Y> const & r ) BOOST_SP_NOEXCEPT
|
||||||
{
|
{
|
||||||
@@ -149,8 +147,6 @@ public:
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||||
|
|
||||||
shared_array & operator=( shared_array && r ) BOOST_SP_NOEXCEPT
|
shared_array & operator=( shared_array && r ) BOOST_SP_NOEXCEPT
|
||||||
|
@@ -570,8 +570,6 @@ public:
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1400)
|
|
||||||
|
|
||||||
template<class Y>
|
template<class Y>
|
||||||
shared_ptr & operator=(shared_ptr<Y> const & r) BOOST_SP_NOEXCEPT
|
shared_ptr & operator=(shared_ptr<Y> const & r) BOOST_SP_NOEXCEPT
|
||||||
{
|
{
|
||||||
@@ -579,8 +577,6 @@ public:
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef BOOST_NO_AUTO_PTR
|
#ifndef BOOST_NO_AUTO_PTR
|
||||||
|
|
||||||
template<class Y>
|
template<class Y>
|
||||||
|
@@ -155,8 +155,6 @@ public:
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1300)
|
|
||||||
|
|
||||||
template<class Y>
|
template<class Y>
|
||||||
weak_ptr & operator=( weak_ptr<Y> const & r ) BOOST_SP_NOEXCEPT
|
weak_ptr & operator=( weak_ptr<Y> const & r ) BOOST_SP_NOEXCEPT
|
||||||
{
|
{
|
||||||
@@ -190,8 +188,6 @@ public:
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
shared_ptr<T> lock() const BOOST_SP_NOEXCEPT
|
shared_ptr<T> lock() const BOOST_SP_NOEXCEPT
|
||||||
{
|
{
|
||||||
return shared_ptr<T>( *this, boost::detail::sp_nothrow_tag() );
|
return shared_ptr<T>( *this, boost::detail::sp_nothrow_tag() );
|
||||||
|
@@ -1,12 +1,3 @@
|
|||||||
#include <boost/config.hpp>
|
|
||||||
|
|
||||||
#if defined(BOOST_MSVC)
|
|
||||||
#pragma warning(disable: 4786) // identifier truncated in debug info
|
|
||||||
#pragma warning(disable: 4710) // function not inlined
|
|
||||||
#pragma warning(disable: 4711) // function selected for automatic inline expansion
|
|
||||||
#pragma warning(disable: 4514) // unreferenced inline removed
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// auto_ptr_lv_fail.cpp - a negative test for converting an auto_ptr to shared_ptr
|
// auto_ptr_lv_fail.cpp - a negative test for converting an auto_ptr to shared_ptr
|
||||||
//
|
//
|
||||||
|
@@ -1,21 +1,3 @@
|
|||||||
#include <boost/config.hpp>
|
|
||||||
|
|
||||||
#if defined(BOOST_MSVC)
|
|
||||||
|
|
||||||
#pragma warning(disable: 4786) // identifier truncated in debug info
|
|
||||||
#pragma warning(disable: 4710) // function not inlined
|
|
||||||
#pragma warning(disable: 4711) // function selected for automatic inline expansion
|
|
||||||
#pragma warning(disable: 4514) // unreferenced inline removed
|
|
||||||
#pragma warning(disable: 4355) // 'this' : used in base member initializer list
|
|
||||||
#pragma warning(disable: 4511) // copy constructor could not be generated
|
|
||||||
#pragma warning(disable: 4512) // assignment operator could not be generated
|
|
||||||
|
|
||||||
#if (BOOST_MSVC >= 1310)
|
|
||||||
#pragma warning(disable: 4675) // resolved overload found with Koenig lookup
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// intrusive_ptr_move_test.cpp
|
// intrusive_ptr_move_test.cpp
|
||||||
//
|
//
|
||||||
@@ -26,9 +8,9 @@
|
|||||||
// http://www.boost.org/LICENSE_1_0.txt)
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
//
|
//
|
||||||
|
|
||||||
#include <boost/core/lightweight_test.hpp>
|
|
||||||
#include <boost/intrusive_ptr.hpp>
|
#include <boost/intrusive_ptr.hpp>
|
||||||
#include <boost/detail/atomic_count.hpp>
|
#include <boost/smart_ptr/detail/atomic_count.hpp>
|
||||||
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
|
@@ -1,21 +1,3 @@
|
|||||||
#include <boost/config.hpp>
|
|
||||||
|
|
||||||
#if defined(BOOST_MSVC)
|
|
||||||
|
|
||||||
#pragma warning(disable: 4786) // identifier truncated in debug info
|
|
||||||
#pragma warning(disable: 4710) // function not inlined
|
|
||||||
#pragma warning(disable: 4711) // function selected for automatic inline expansion
|
|
||||||
#pragma warning(disable: 4514) // unreferenced inline removed
|
|
||||||
#pragma warning(disable: 4355) // 'this' : used in base member initializer list
|
|
||||||
#pragma warning(disable: 4511) // copy constructor could not be generated
|
|
||||||
#pragma warning(disable: 4512) // assignment operator could not be generated
|
|
||||||
|
|
||||||
#if (BOOST_MSVC >= 1310)
|
|
||||||
#pragma warning(disable: 4675) // resolved overload found with Koenig lookup
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// intrusive_ptr_test.cpp
|
// intrusive_ptr_test.cpp
|
||||||
//
|
//
|
||||||
@@ -26,9 +8,9 @@
|
|||||||
// http://www.boost.org/LICENSE_1_0.txt)
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
//
|
//
|
||||||
|
|
||||||
#include <boost/core/lightweight_test.hpp>
|
|
||||||
#include <boost/intrusive_ptr.hpp>
|
#include <boost/intrusive_ptr.hpp>
|
||||||
#include <boost/detail/atomic_count.hpp>
|
#include <boost/smart_ptr/detail/atomic_count.hpp>
|
||||||
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
@@ -12,28 +12,11 @@
|
|||||||
* This file contains tests for the \c intrusive_ref_counter base class.
|
* This file contains tests for the \c intrusive_ref_counter base class.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <boost/config.hpp>
|
|
||||||
|
|
||||||
#if defined(BOOST_MSVC)
|
|
||||||
|
|
||||||
#pragma warning(disable: 4786) // identifier truncated in debug info
|
|
||||||
#pragma warning(disable: 4710) // function not inlined
|
|
||||||
#pragma warning(disable: 4711) // function selected for automatic inline expansion
|
|
||||||
#pragma warning(disable: 4514) // unreferenced inline removed
|
|
||||||
#pragma warning(disable: 4355) // 'this' : used in base member initializer list
|
|
||||||
#pragma warning(disable: 4511) // copy constructor could not be generated
|
|
||||||
#pragma warning(disable: 4512) // assignment operator could not be generated
|
|
||||||
|
|
||||||
#if (BOOST_MSVC >= 1310)
|
|
||||||
#pragma warning(disable: 4675) // resolved overload found with Koenig lookup
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <cstddef>
|
|
||||||
#include <boost/smart_ptr/intrusive_ref_counter.hpp>
|
#include <boost/smart_ptr/intrusive_ref_counter.hpp>
|
||||||
#include <boost/intrusive_ptr.hpp>
|
#include <boost/intrusive_ptr.hpp>
|
||||||
#include <boost/core/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
#include <boost/config.hpp>
|
||||||
|
#include <cstddef>
|
||||||
|
|
||||||
namespace N1 {
|
namespace N1 {
|
||||||
|
|
||||||
|
@@ -1,12 +1,3 @@
|
|||||||
#include <boost/config.hpp>
|
|
||||||
|
|
||||||
#if defined(BOOST_MSVC)
|
|
||||||
#pragma warning(disable: 4786) // identifier truncated in debug info
|
|
||||||
#pragma warning(disable: 4710) // function not inlined
|
|
||||||
#pragma warning(disable: 4711) // function selected for automatic inline expansion
|
|
||||||
#pragma warning(disable: 4514) // unreferenced inline removed
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// scoped_array_eq_fail.cpp - a negative test for "p == q"
|
// scoped_array_eq_fail.cpp - a negative test for "p == q"
|
||||||
//
|
//
|
||||||
|
@@ -1,12 +1,3 @@
|
|||||||
#include <boost/config.hpp>
|
|
||||||
|
|
||||||
#if defined(BOOST_MSVC)
|
|
||||||
#pragma warning(disable: 4786) // identifier truncated in debug info
|
|
||||||
#pragma warning(disable: 4710) // function not inlined
|
|
||||||
#pragma warning(disable: 4711) // function selected for automatic inline expansion
|
|
||||||
#pragma warning(disable: 4514) // unreferenced inline removed
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// scoped_ptr_eq_fail.cpp - a negative test for "p == q"
|
// scoped_ptr_eq_fail.cpp - a negative test for "p == q"
|
||||||
//
|
//
|
||||||
|
@@ -1,16 +1,3 @@
|
|||||||
#include <boost/config.hpp>
|
|
||||||
|
|
||||||
#if defined(BOOST_MSVC)
|
|
||||||
#pragma warning(disable: 4786) // identifier truncated in debug info
|
|
||||||
#pragma warning(disable: 4710) // function not inlined
|
|
||||||
#pragma warning(disable: 4711) // function selected for automatic inline expansion
|
|
||||||
#pragma warning(disable: 4514) // unreferenced inline removed
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__GNUC__) && __GNUC__ > 4
|
|
||||||
# pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// shared_from_this_test.cpp
|
// shared_from_this_test.cpp
|
||||||
//
|
//
|
||||||
@@ -21,9 +8,13 @@
|
|||||||
// http://www.boost.org/LICENSE_1_0.txt)
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#if defined(__GNUC__) && __GNUC__ > 4
|
||||||
|
# pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <boost/enable_shared_from_this.hpp>
|
#include <boost/enable_shared_from_this.hpp>
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
|
#include <boost/config.hpp>
|
||||||
|
|
||||||
#include <boost/core/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
|
@@ -1,12 +1,3 @@
|
|||||||
#include <boost/config.hpp>
|
|
||||||
|
|
||||||
#if defined(BOOST_MSVC)
|
|
||||||
#pragma warning(disable: 4786) // identifier truncated in debug info
|
|
||||||
#pragma warning(disable: 4710) // function not inlined
|
|
||||||
#pragma warning(disable: 4711) // function selected for automatic inline expansion
|
|
||||||
#pragma warning(disable: 4514) // unreferenced inline removed
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// shared_ptr_assign_fail.cpp - a negative test for shared_ptr assignment
|
// shared_ptr_assign_fail.cpp - a negative test for shared_ptr assignment
|
||||||
//
|
//
|
||||||
@@ -19,11 +10,6 @@
|
|||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
bool boost_error(char const *, char const *, char const *, long)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
boost::shared_ptr<int> p;
|
boost::shared_ptr<int> p;
|
||||||
|
@@ -1,23 +1,3 @@
|
|||||||
#include <boost/config.hpp>
|
|
||||||
|
|
||||||
#if defined(BOOST_MSVC)
|
|
||||||
|
|
||||||
#pragma warning(disable: 4786) // identifier truncated in debug info
|
|
||||||
#pragma warning(disable: 4710) // function not inlined
|
|
||||||
#pragma warning(disable: 4711) // function selected for automatic inline expansion
|
|
||||||
#pragma warning(disable: 4514) // unreferenced inline removed
|
|
||||||
#pragma warning(disable: 4355) // 'this' : used in base member initializer list
|
|
||||||
|
|
||||||
#if (BOOST_MSVC >= 1310)
|
|
||||||
#pragma warning(disable: 4675) // resolved overload found with Koenig lookup
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__GNUC__) && __GNUC__ > 4
|
|
||||||
# pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// shared_ptr_basic_test.cpp
|
// shared_ptr_basic_test.cpp
|
||||||
//
|
//
|
||||||
@@ -28,10 +8,15 @@
|
|||||||
// http://www.boost.org/LICENSE_1_0.txt)
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
//
|
//
|
||||||
|
|
||||||
#include <boost/core/lightweight_test.hpp>
|
#if defined(__GNUC__) && __GNUC__ > 4
|
||||||
|
# pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <boost/weak_ptr.hpp>
|
#include <boost/weak_ptr.hpp>
|
||||||
|
#include <boost/config.hpp>
|
||||||
|
|
||||||
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
|
|
||||||
|
@@ -1,12 +1,3 @@
|
|||||||
#include <boost/config.hpp>
|
|
||||||
|
|
||||||
#if defined(BOOST_MSVC)
|
|
||||||
#pragma warning(disable: 4786) // identifier truncated in debug info
|
|
||||||
#pragma warning(disable: 4710) // function not inlined
|
|
||||||
#pragma warning(disable: 4711) // function selected for automatic inline expansion
|
|
||||||
#pragma warning(disable: 4514) // unreferenced inline removed
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// shared_ptr_compare_fail.cpp - a negative test for "p > q"
|
// shared_ptr_compare_fail.cpp - a negative test for "p > q"
|
||||||
//
|
//
|
||||||
|
@@ -1,12 +1,3 @@
|
|||||||
#include <boost/config.hpp>
|
|
||||||
|
|
||||||
#if defined(BOOST_MSVC)
|
|
||||||
#pragma warning(disable: 4786) // identifier truncated in debug info
|
|
||||||
#pragma warning(disable: 4710) // function not inlined
|
|
||||||
#pragma warning(disable: 4711) // function selected for automatic inline expansion
|
|
||||||
#pragma warning(disable: 4514) // unreferenced inline removed
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// shared_ptr_delete_fail.cpp - a negative test for "delete sp;"
|
// shared_ptr_delete_fail.cpp - a negative test for "delete sp;"
|
||||||
//
|
//
|
||||||
|
@@ -1,12 +1,3 @@
|
|||||||
#include <boost/config.hpp>
|
|
||||||
|
|
||||||
#if defined(BOOST_MSVC)
|
|
||||||
#pragma warning(disable: 4786) // identifier truncated in debug info
|
|
||||||
#pragma warning(disable: 4710) // function not inlined
|
|
||||||
#pragma warning(disable: 4711) // function selected for automatic inline expansion
|
|
||||||
#pragma warning(disable: 4514) // unreferenced inline removed
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// shared_ptr_pv_fail.cpp - a negative test for converting a shared_ptr to void*
|
// shared_ptr_pv_fail.cpp - a negative test for converting a shared_ptr to void*
|
||||||
//
|
//
|
||||||
|
@@ -1,23 +1,3 @@
|
|||||||
#include <boost/config.hpp>
|
|
||||||
|
|
||||||
#if defined(BOOST_MSVC)
|
|
||||||
|
|
||||||
#pragma warning(disable: 4786) // identifier truncated in debug info
|
|
||||||
#pragma warning(disable: 4710) // function not inlined
|
|
||||||
#pragma warning(disable: 4711) // function selected for automatic inline expansion
|
|
||||||
#pragma warning(disable: 4514) // unreferenced inline removed
|
|
||||||
#pragma warning(disable: 4355) // 'this' : used in base member initializer list
|
|
||||||
|
|
||||||
#if (BOOST_MSVC >= 1310)
|
|
||||||
#pragma warning(disable: 4675) // resolved overload found with Koenig lookup
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__GNUC__) && __GNUC__ > 4
|
|
||||||
# pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// shared_ptr_test.cpp
|
// shared_ptr_test.cpp
|
||||||
//
|
//
|
||||||
@@ -28,10 +8,15 @@
|
|||||||
// http://www.boost.org/LICENSE_1_0.txt)
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
//
|
//
|
||||||
|
|
||||||
#include <boost/core/lightweight_test.hpp>
|
#if defined(__GNUC__) && __GNUC__ > 4
|
||||||
|
# pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <boost/weak_ptr.hpp>
|
#include <boost/weak_ptr.hpp>
|
||||||
|
#include <boost/config.hpp>
|
||||||
|
|
||||||
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@@ -152,14 +137,10 @@ void pointer_constructor()
|
|||||||
{
|
{
|
||||||
pc0_test(static_cast<int*>(0));
|
pc0_test(static_cast<int*>(0));
|
||||||
|
|
||||||
#if !defined(BOOST_MSVC) || (BOOST_MSVC > 1300)
|
|
||||||
|
|
||||||
pc0_test(static_cast<int const*>(0));
|
pc0_test(static_cast<int const*>(0));
|
||||||
pc0_test(static_cast<int volatile*>(0));
|
pc0_test(static_cast<int volatile*>(0));
|
||||||
pc0_test(static_cast<int const volatile*>(0));
|
pc0_test(static_cast<int const volatile*>(0));
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
{
|
{
|
||||||
boost::shared_ptr<int const> pi(static_cast<int*>(0));
|
boost::shared_ptr<int const> pi(static_cast<int*>(0));
|
||||||
BOOST_TEST(pi? false: true);
|
BOOST_TEST(pi? false: true);
|
||||||
|
@@ -16,22 +16,9 @@
|
|||||||
|
|
||||||
#define _CRT_SECURE_NO_WARNINGS
|
#define _CRT_SECURE_NO_WARNINGS
|
||||||
|
|
||||||
#include <boost/config.hpp>
|
|
||||||
|
|
||||||
#if defined(BOOST_MSVC)
|
|
||||||
|
|
||||||
# pragma warning(disable: 4786) // identifier truncated in debug info
|
|
||||||
# pragma warning(disable: 4710) // function not inlined
|
|
||||||
# pragma warning(disable: 4711) // function selected for automatic inline expansion
|
|
||||||
# pragma warning(disable: 4514) // unreferenced inline removed
|
|
||||||
|
|
||||||
#if (BOOST_MSVC >= 1310)
|
|
||||||
# pragma warning(disable: 4675) // resolved overload found with Koenig lookup
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <boost/smart_ptr.hpp>
|
#include <boost/smart_ptr.hpp>
|
||||||
|
#include <boost/config.hpp>
|
||||||
|
|
||||||
#include <boost/core/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
|
@@ -75,14 +75,7 @@ int main()
|
|||||||
test_default< Y >();
|
test_default< Y >();
|
||||||
test_destroy< Y >();
|
test_destroy< Y >();
|
||||||
|
|
||||||
// test_move< Y >();
|
test_move< Y >();
|
||||||
BOOST_TEST_TRAIT_TRUE(( std::is_nothrow_move_constructible<Y> ));
|
|
||||||
|
|
||||||
#if !( defined( BOOST_MSVC ) && BOOST_MSVC == 1700 )
|
|
||||||
|
|
||||||
BOOST_TEST_TRAIT_TRUE(( std::is_nothrow_move_assignable<Y> ));
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
test_default< boost::scoped_ptr<X> >();
|
test_default< boost::scoped_ptr<X> >();
|
||||||
test_default< boost::scoped_array<X> >();
|
test_default< boost::scoped_array<X> >();
|
||||||
|
@@ -7,8 +7,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <boost/smart_ptr.hpp>
|
#include <boost/smart_ptr.hpp>
|
||||||
#include <boost/config.hpp>
|
|
||||||
#include <boost/config/workaround.hpp>
|
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
@@ -16,10 +14,5 @@ int main()
|
|||||||
boost::shared_ptr<int[]> p2( new int[1] );
|
boost::shared_ptr<int[]> p2( new int[1] );
|
||||||
|
|
||||||
boost::make_shared<int>();
|
boost::make_shared<int>();
|
||||||
|
|
||||||
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1500)
|
|
||||||
|
|
||||||
boost::make_shared<int[]>( 1 );
|
boost::make_shared<int[]>( 1 );
|
||||||
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
@@ -3,8 +3,6 @@
|
|||||||
// https://www.boost.org/LICENSE_1_0.txt
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/smart_ptr.hpp>
|
#include <boost/smart_ptr.hpp>
|
||||||
#include <boost/config.hpp>
|
|
||||||
#include <boost/config/workaround.hpp>
|
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
@@ -12,10 +10,5 @@ int main()
|
|||||||
boost::shared_ptr<int[]> p2( new int[1] );
|
boost::shared_ptr<int[]> p2( new int[1] );
|
||||||
|
|
||||||
boost::make_shared<int>();
|
boost::make_shared<int>();
|
||||||
|
|
||||||
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1500)
|
|
||||||
|
|
||||||
boost::make_shared<int[]>( 1 );
|
boost::make_shared<int[]>( 1 );
|
||||||
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
@@ -49,9 +49,6 @@ int main()
|
|||||||
BOOST_TEST( q != 0 && q->data == 17041 );
|
BOOST_TEST( q != 0 && q->data == 17041 );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, < 1300 )
|
|
||||||
#else
|
|
||||||
|
|
||||||
{
|
{
|
||||||
boost::shared_ptr<X> p( &x, deleter(), std::allocator<X>() );
|
boost::shared_ptr<X> p( &x, deleter(), std::allocator<X>() );
|
||||||
|
|
||||||
@@ -61,7 +58,5 @@ int main()
|
|||||||
BOOST_TEST( q != 0 && q->data == 17041 );
|
BOOST_TEST( q != 0 && q->data == 17041 );
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return boost::report_errors();
|
return boost::report_errors();
|
||||||
}
|
}
|
||||||
|
@@ -1,19 +1,3 @@
|
|||||||
#include <boost/config.hpp>
|
|
||||||
|
|
||||||
#if defined(BOOST_MSVC)
|
|
||||||
|
|
||||||
#pragma warning(disable: 4786) // identifier truncated in debug info
|
|
||||||
#pragma warning(disable: 4710) // function not inlined
|
|
||||||
#pragma warning(disable: 4711) // function selected for automatic inline expansion
|
|
||||||
#pragma warning(disable: 4514) // unreferenced inline removed
|
|
||||||
#pragma warning(disable: 4355) // 'this' : used in base member initializer list
|
|
||||||
|
|
||||||
#if (BOOST_MSVC >= 1310)
|
|
||||||
#pragma warning(disable: 4675) // resolved overload found with Koenig lookup
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// weak_ptr_test.cpp
|
// weak_ptr_test.cpp
|
||||||
//
|
//
|
||||||
@@ -24,10 +8,11 @@
|
|||||||
// http://www.boost.org/LICENSE_1_0.txt)
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
//
|
//
|
||||||
|
|
||||||
#include <boost/core/lightweight_test.hpp>
|
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <boost/weak_ptr.hpp>
|
#include <boost/weak_ptr.hpp>
|
||||||
|
#include <boost/config.hpp>
|
||||||
|
|
||||||
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
Reference in New Issue
Block a user