Remove support for BOOST_SP_USE_STD_ALLOCATOR

This commit is contained in:
Peter Dimov
2025-10-24 15:43:34 +03:00
parent 86a873a58c
commit bee3766c04
3 changed files with 1 additions and 39 deletions

View File

@@ -15,7 +15,7 @@ BOOST_PRAGMA_MESSAGE("The macro BOOST_SP_ENABLE_DEBUG_HOOKS has been deprecated
#if defined(BOOST_SP_USE_STD_ALLOCATOR)
BOOST_PRAGMA_MESSAGE("The macro BOOST_SP_USE_STD_ALLOCATOR has been deprecated in 1.87 and support for it will be removed.")
BOOST_PRAGMA_MESSAGE("The macro BOOST_SP_USE_STD_ALLOCATOR has been deprecated in 1.87 and support for it was removed in 1.90.")
#endif

View File

@@ -18,10 +18,6 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
#if defined(BOOST_SP_USE_STD_ALLOCATOR) && defined(BOOST_SP_USE_QUICK_ALLOCATOR)
# error BOOST_SP_USE_STD_ALLOCATOR and BOOST_SP_USE_QUICK_ALLOCATOR are incompatible.
#endif
#include <boost/smart_ptr/detail/sp_counted_base.hpp>
#include <boost/smart_ptr/detail/deprecated_macros.hpp>
#include <boost/core/checked_delete.hpp>
@@ -91,20 +87,6 @@ public:
return 0;
}
#if defined(BOOST_SP_USE_STD_ALLOCATOR)
void * operator new( std::size_t )
{
return std::allocator<this_type>().allocate( 1, static_cast<this_type *>(0) );
}
void operator delete( void * p )
{
std::allocator<this_type>().deallocate( static_cast<this_type *>(p), 1 );
}
#endif
#if defined(BOOST_SP_USE_QUICK_ALLOCATOR)
void * operator new( std::size_t )
@@ -164,20 +146,6 @@ public:
return &reinterpret_cast<char&>( del );
}
#if defined(BOOST_SP_USE_STD_ALLOCATOR)
void * operator new( std::size_t )
{
return std::allocator<this_type>().allocate( 1, static_cast<this_type *>(0) );
}
void operator delete( void * p )
{
std::allocator<this_type>().deallocate( static_cast<this_type *>(p), 1 );
}
#endif
#if defined(BOOST_SP_USE_QUICK_ALLOCATOR)
void * operator new( std::size_t )

View File

@@ -122,12 +122,6 @@ int main()
std::cout << "BOOST_HAS_THREADS: (not defined)\n";
#endif
#if defined(BOOST_SP_USE_STD_ALLOCATOR)
std::cout << "BOOST_SP_USE_STD_ALLOCATOR: (defined)\n";
#else
std::cout << "BOOST_SP_USE_STD_ALLOCATOR: (not defined)\n";
#endif
#if defined(BOOST_SP_USE_QUICK_ALLOCATOR)
std::cout << "BOOST_SP_USE_QUICK_ALLOCATOR: (defined)\n";
#else