Remove uses of BOOST_NO_CXX11_SMART_PTR

This commit is contained in:
Peter Dimov
2024-09-25 02:45:57 +03:00
parent ce308f21e8
commit 314267a5f7
26 changed files with 35 additions and 268 deletions

View File

@ -10,8 +10,11 @@
#ifndef BOOST_POINTER_CAST_HPP
#define BOOST_POINTER_CAST_HPP
#include <boost/config.hpp>
#include <boost/smart_ptr/detail/sp_noexcept.hpp>
#include <boost/type_traits/has_virtual_destructor.hpp>
#include <boost/static_assert.hpp>
#include <boost/config.hpp>
#include <memory>
namespace boost {
@ -43,16 +46,6 @@ inline T* reinterpret_pointer_cast(U *ptr) BOOST_SP_NOEXCEPT
return reinterpret_cast<T*>(ptr);
}
} // namespace boost
#if !defined( BOOST_NO_CXX11_SMART_PTR )
#include <boost/type_traits/has_virtual_destructor.hpp>
#include <boost/static_assert.hpp>
#include <memory>
namespace boost {
//static_pointer_cast overload for std::shared_ptr
using std::static_pointer_cast;
@ -117,6 +110,4 @@ template<class T, class U> std::unique_ptr<T> reinterpret_pointer_cast( std::uni
} // namespace boost
#endif // #if !defined( BOOST_NO_CXX11_SMART_PTR )
#endif //BOOST_POINTER_CAST_HPP

View File

@ -106,16 +106,8 @@ public:
extern "C" void * lw_thread_routine( void * pv )
{
#if defined(BOOST_NO_CXX11_SMART_PTR)
std::auto_ptr<lw_abstract_thread> pt( static_cast<lw_abstract_thread *>( pv ) );
#else
std::unique_ptr<lw_abstract_thread> pt( static_cast<lw_abstract_thread *>( pv ) );
#endif
pt->run();
return 0;
@ -125,16 +117,8 @@ extern "C" void * lw_thread_routine( void * pv )
unsigned __stdcall lw_thread_routine( void * pv )
{
#if defined(BOOST_NO_CXX11_SMART_PTR)
std::auto_ptr<lw_abstract_thread> pt( static_cast<lw_abstract_thread *>( pv ) );
#else
std::unique_ptr<lw_abstract_thread> pt( static_cast<lw_abstract_thread *>( pv ) );
#endif
pt->run();
return 0;
@ -162,16 +146,8 @@ private:
template<class F> int lw_thread_create( lw_thread_t & th, F f )
{
#if defined(BOOST_NO_CXX11_SMART_PTR)
std::auto_ptr<lw_abstract_thread> p( new lw_thread_impl<F>( f ) );
#else
std::unique_ptr<lw_abstract_thread> p( new lw_thread_impl<F>( f ) );
#endif
int r = lw_thread_create_( &th, 0, lw_thread_routine, p.get() );
if( r == 0 )

View File

@ -358,8 +358,6 @@ public:
#endif
#if !defined( BOOST_NO_CXX11_SMART_PTR )
template<class Y, class D>
explicit shared_count( std::unique_ptr<Y, D> & r ): pi_( 0 )
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
@ -383,8 +381,6 @@ public:
r.release();
}
#endif
template<class Y, class D>
explicit shared_count( boost::movelib::unique_ptr<Y, D> & r ): pi_( 0 )
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)

View File

@ -5,13 +5,9 @@ Copyright 2019 Glen Joseph Fernandes
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#include <boost/config.hpp>
#if (!defined(BOOST_LIBSTDCXX_VERSION) || \
BOOST_LIBSTDCXX_VERSION >= 46000) && \
!defined(BOOST_NO_CXX11_SMART_PTR) && \
!defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
#include <boost/smart_ptr/allocate_unique.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/config.hpp>
template<class T = void>
struct creator {
@ -76,9 +72,3 @@ int main()
}
return boost::report_errors();
}
#else
int main()
{
return 0;
}
#endif

View File

@ -5,13 +5,9 @@ Copyright 2019 Glen Joseph Fernandes
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#include <boost/config.hpp>
#if (!defined(BOOST_LIBSTDCXX_VERSION) || \
BOOST_LIBSTDCXX_VERSION >= 46000) && \
!defined(BOOST_NO_CXX11_SMART_PTR) && \
!defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
#include <boost/smart_ptr/allocate_unique.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/config.hpp>
template<class T = void>
struct creator {
@ -103,9 +99,3 @@ int main()
}
return boost::report_errors();
}
#else
int main()
{
return 0;
}
#endif

View File

@ -5,13 +5,9 @@ Copyright 2019 Glen Joseph Fernandes
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#include <boost/config.hpp>
#if (!defined(BOOST_LIBSTDCXX_VERSION) || \
BOOST_LIBSTDCXX_VERSION >= 48000) && \
!defined(BOOST_NO_CXX11_SMART_PTR) && \
!defined(BOOST_NO_CXX11_ALLOCATOR)
#include <boost/smart_ptr/allocate_unique.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/config.hpp>
struct allow { };
@ -158,9 +154,3 @@ int main()
}
return boost::report_errors();
}
#else
int main()
{
return 0;
}
#endif

View File

@ -5,12 +5,9 @@ Copyright 2019 Glen Joseph Fernandes
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#include <boost/config.hpp>
#if (!defined(BOOST_LIBSTDCXX_VERSION) || \
BOOST_LIBSTDCXX_VERSION >= 48000) && \
!defined(BOOST_NO_CXX11_SMART_PTR)
#include <boost/smart_ptr/allocate_unique.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/config.hpp>
template<class T = void>
struct creator {
@ -220,9 +217,3 @@ int main()
}
return boost::report_errors();
}
#else
int main()
{
return 0;
}
#endif

View File

@ -5,12 +5,9 @@ Copyright 2019 Glen Joseph Fernandes
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#include <boost/config.hpp>
#if (!defined(BOOST_LIBSTDCXX_VERSION) || \
BOOST_LIBSTDCXX_VERSION >= 48000) && \
!defined(BOOST_NO_CXX11_SMART_PTR)
#include <boost/smart_ptr/allocate_unique.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/config.hpp>
template<class T = void>
struct creator {
@ -232,9 +229,3 @@ int main()
}
return boost::report_errors();
}
#else
int main()
{
return 0;
}
#endif

View File

@ -5,12 +5,9 @@ Copyright 2019 Glen Joseph Fernandes
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#include <boost/config.hpp>
#if (!defined(BOOST_LIBSTDCXX_VERSION) || \
BOOST_LIBSTDCXX_VERSION >= 48000) && \
!defined(BOOST_NO_CXX11_SMART_PTR)
#include <boost/smart_ptr/allocate_unique.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/config.hpp>
template<class T = void>
struct creator {
@ -124,9 +121,3 @@ int main()
}
return boost::report_errors();
}
#else
int main()
{
return 0;
}
#endif

View File

@ -5,12 +5,9 @@ Copyright 2019 Glen Joseph Fernandes
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#include <boost/config.hpp>
#if (!defined(BOOST_LIBSTDCXX_VERSION) || \
BOOST_LIBSTDCXX_VERSION >= 48000) && \
!defined(BOOST_NO_CXX11_SMART_PTR)
#include <boost/smart_ptr/allocate_unique.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/config.hpp>
template<class T = void>
struct creator {
@ -90,9 +87,3 @@ int main()
}
return boost::report_errors();
}
#else
int main()
{
return 0;
}
#endif

View File

@ -5,13 +5,9 @@ Copyright 2019 Glen Joseph Fernandes
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#include <boost/config.hpp>
#if (!defined(BOOST_LIBSTDCXX_VERSION) || \
BOOST_LIBSTDCXX_VERSION >= 48000) && \
!defined(BOOST_NO_CXX11_SMART_PTR) && \
!defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
#include <boost/smart_ptr/allocate_unique.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/config.hpp>
template<class T = void>
struct creator {
@ -91,9 +87,3 @@ int main()
}
return boost::report_errors();
}
#else
int main()
{
return 0;
}
#endif

View File

@ -5,10 +5,9 @@ Copyright 2019 Glen Joseph Fernandes
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#include <boost/config.hpp>
#if !defined(BOOST_NO_CXX11_SMART_PTR) && !defined(BOOST_NO_CXX11_ALLOCATOR)
#include <boost/smart_ptr/allocate_unique.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/config.hpp>
struct allow { };
@ -101,9 +100,3 @@ int main()
}
return boost::report_errors();
}
#else
int main()
{
return 0;
}
#endif

View File

@ -5,12 +5,9 @@ Copyright 2019 Glen Joseph Fernandes
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#include <boost/config.hpp>
#if (!defined(BOOST_LIBSTDCXX_VERSION) || \
BOOST_LIBSTDCXX_VERSION >= 46000) && \
!defined(BOOST_NO_CXX11_SMART_PTR)
#include <boost/smart_ptr/allocate_unique.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/config.hpp>
template<class T = void>
struct creator {
@ -118,9 +115,3 @@ int main()
}
return boost::report_errors();
}
#else
int main()
{
return 0;
}
#endif

View File

@ -5,12 +5,9 @@ Copyright 2019 Glen Joseph Fernandes
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#include <boost/config.hpp>
#if (!defined(BOOST_LIBSTDCXX_VERSION) || \
BOOST_LIBSTDCXX_VERSION >= 46000) && \
!defined(BOOST_NO_CXX11_SMART_PTR)
#include <boost/smart_ptr/allocate_unique.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/config.hpp>
template<class T = void>
struct creator {
@ -107,9 +104,3 @@ int main()
}
return boost::report_errors();
}
#else
int main()
{
return 0;
}
#endif

View File

@ -5,12 +5,9 @@ Copyright 2019 Glen Joseph Fernandes
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#include <boost/config.hpp>
#if (!defined(BOOST_LIBSTDCXX_VERSION) || \
BOOST_LIBSTDCXX_VERSION >= 46000) && \
!defined(BOOST_NO_CXX11_SMART_PTR)
#include <boost/smart_ptr/allocate_unique.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/config.hpp>
template<class T = void>
struct creator {
@ -88,9 +85,3 @@ int main()
}
return boost::report_errors();
}
#else
int main()
{
return 0;
}
#endif

View File

@ -5,12 +5,9 @@ Copyright 2019 Glen Joseph Fernandes
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#include <boost/config.hpp>
#if (!defined(BOOST_LIBSTDCXX_VERSION) || \
BOOST_LIBSTDCXX_VERSION >= 46000) && \
!defined(BOOST_NO_CXX11_SMART_PTR)
#include <boost/smart_ptr/allocate_unique.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/config.hpp>
template<class T = void>
struct creator {
@ -95,9 +92,3 @@ int main()
}
return boost::report_errors();
}
#else
int main()
{
return 0;
}
#endif

View File

@ -5,12 +5,9 @@ Copyright 2021 Glen Joseph Fernandes
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#include <boost/config.hpp>
#if (!defined(BOOST_LIBSTDCXX_VERSION) || \
BOOST_LIBSTDCXX_VERSION >= 46000) && \
!defined(BOOST_NO_CXX11_SMART_PTR)
#include <boost/smart_ptr/allocate_unique.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/config.hpp>
template<class T>
class point {
@ -242,9 +239,3 @@ int main()
}
return boost::report_errors();
}
#else
int main()
{
return 0;
}
#endif

View File

@ -5,10 +5,9 @@ Copyright 2014 Glen Joseph Fernandes
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#include <boost/config.hpp>
#if !defined(BOOST_NO_CXX11_SMART_PTR)
#include <boost/core/lightweight_test.hpp>
#include <boost/smart_ptr/make_unique.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/config.hpp>
class type {
public:
@ -147,9 +146,3 @@ int main()
#endif
return boost::report_errors();
}
#else
int main()
{
return 0;
}
#endif

View File

@ -5,10 +5,9 @@ Copyright 2014 Glen Joseph Fernandes
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#include <boost/config.hpp>
#if !defined(BOOST_NO_CXX11_SMART_PTR)
#include <boost/core/lightweight_test.hpp>
#include <boost/smart_ptr/make_unique.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/config.hpp>
class type {
public:
@ -79,9 +78,3 @@ int main()
}
return boost::report_errors();
}
#else
int main()
{
return 0;
}
#endif

View File

@ -5,10 +5,9 @@ Copyright 2014 Glen Joseph Fernandes
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#include <boost/config.hpp>
#if !defined(BOOST_NO_CXX11_SMART_PTR)
#include <boost/core/lightweight_test.hpp>
#include <boost/smart_ptr/make_unique.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/config.hpp>
class type {
public:
@ -102,9 +101,3 @@ int main()
}
return boost::report_errors();
}
#else
int main()
{
return 0;
}
#endif

View File

@ -5,10 +5,9 @@ Copyright 2014 Glen Joseph Fernandes
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#include <boost/config.hpp>
#if !defined(BOOST_NO_CXX11_SMART_PTR)
#include <boost/core/lightweight_test.hpp>
#include <boost/smart_ptr/make_unique.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/config.hpp>
class type {
public:
@ -64,9 +63,3 @@ int main()
}
return boost::report_errors();
}
#else
int main()
{
return 0;
}
#endif

View File

@ -5,10 +5,9 @@ Copyright 2014 Glen Joseph Fernandes
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#include <boost/config.hpp>
#if !defined(BOOST_NO_CXX11_SMART_PTR)
#include <boost/core/lightweight_test.hpp>
#include <boost/smart_ptr/make_unique.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/config.hpp>
class type {
public:
@ -55,9 +54,3 @@ int main()
}
return boost::report_errors();
}
#else
int main()
{
return 0;
}
#endif

View File

@ -5,10 +5,9 @@ Copyright 2014 Glen Joseph Fernandes
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#include <boost/config.hpp>
#if !defined(BOOST_NO_CXX11_SMART_PTR)
#include <boost/core/lightweight_test.hpp>
#include <boost/smart_ptr/make_unique.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/config.hpp>
class type {
public:
@ -62,9 +61,3 @@ int main()
}
return boost::report_errors();
}
#else
int main()
{
return 0;
}
#endif

View File

@ -5,10 +5,9 @@ Copyright 2014 Glen Joseph Fernandes
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#include <boost/config.hpp>
#if !defined(BOOST_NO_CXX11_SMART_PTR)
#include <boost/core/lightweight_test.hpp>
#include <boost/smart_ptr/make_unique.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/config.hpp>
class type {
public:
@ -43,9 +42,3 @@ int main()
}
return boost::report_errors();
}
#else
int main()
{
return 0;
}
#endif

View File

@ -5,10 +5,9 @@ Copyright 2014 Glen Joseph Fernandes
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#include <boost/config.hpp>
#if !defined(BOOST_NO_CXX11_SMART_PTR)
#include <boost/core/lightweight_test.hpp>
#include <boost/smart_ptr/make_unique.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/config.hpp>
struct type {
int x;
@ -48,9 +47,3 @@ int main()
#endif
return boost::report_errors();
}
#else
int main()
{
return 0;
}
#endif

View File

@ -8,19 +8,9 @@
// http://www.boost.org/LICENSE_1_0.txt
//
#include <boost/config.hpp>
#if defined( BOOST_NO_CXX11_SMART_PTR )
int main()
{
return 0;
}
#else
#include <boost/pointer_cast.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/config.hpp>
#include <memory>
struct B1
@ -243,5 +233,3 @@ int main()
return boost::report_errors();
}
#endif