From 6dffeb8a7545653af942acae51efc96a7834871d Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 24 Oct 2025 15:51:20 +0300 Subject: [PATCH] Remove support for BOOST_SP_USE_QUICK_ALLOCATOR --- .../smart_ptr/detail/deprecated_macros.hpp | 2 +- .../smart_ptr/detail/sp_counted_impl.hpp | 32 ------------------- test/shared_ptr_alloc_test.cpp | 6 ---- 3 files changed, 1 insertion(+), 39 deletions(-) diff --git a/include/boost/smart_ptr/detail/deprecated_macros.hpp b/include/boost/smart_ptr/detail/deprecated_macros.hpp index f39d2ac..078d6df 100644 --- a/include/boost/smart_ptr/detail/deprecated_macros.hpp +++ b/include/boost/smart_ptr/detail/deprecated_macros.hpp @@ -21,7 +21,7 @@ BOOST_PRAGMA_MESSAGE("The macro BOOST_SP_USE_STD_ALLOCATOR has been deprecated i #if defined(BOOST_SP_USE_QUICK_ALLOCATOR) -BOOST_PRAGMA_MESSAGE("The macro BOOST_SP_USE_QUICK_ALLOCATOR has been deprecated in 1.87 and support for it will be removed.") +BOOST_PRAGMA_MESSAGE("The macro BOOST_SP_USE_QUICK_ALLOCATOR has been deprecated in 1.87 and support for it was removed in 1.90.") #endif diff --git a/include/boost/smart_ptr/detail/sp_counted_impl.hpp b/include/boost/smart_ptr/detail/sp_counted_impl.hpp index 6fdf9c3..c8af04e 100644 --- a/include/boost/smart_ptr/detail/sp_counted_impl.hpp +++ b/include/boost/smart_ptr/detail/sp_counted_impl.hpp @@ -24,10 +24,6 @@ #include #include -#if defined(BOOST_SP_USE_QUICK_ALLOCATOR) -#include -#endif - #include // std::allocator, std::allocator_traits #include // std::size_t @@ -86,20 +82,6 @@ public: { return 0; } - -#if defined(BOOST_SP_USE_QUICK_ALLOCATOR) - - void * operator new( std::size_t ) - { - return quick_allocator::alloc(); - } - - void operator delete( void * p ) - { - quick_allocator::dealloc( p ); - } - -#endif }; template class BOOST_SYMBOL_VISIBLE sp_counted_impl_pd: public sp_counted_base @@ -145,20 +127,6 @@ public: { return &reinterpret_cast( del ); } - -#if defined(BOOST_SP_USE_QUICK_ALLOCATOR) - - void * operator new( std::size_t ) - { - return quick_allocator::alloc(); - } - - void operator delete( void * p ) - { - quick_allocator::dealloc( p ); - } - -#endif }; template class BOOST_SYMBOL_VISIBLE sp_counted_impl_pda: public sp_counted_base diff --git a/test/shared_ptr_alloc_test.cpp b/test/shared_ptr_alloc_test.cpp index a0ec41e..9ae9628 100644 --- a/test/shared_ptr_alloc_test.cpp +++ b/test/shared_ptr_alloc_test.cpp @@ -122,12 +122,6 @@ int main() std::cout << "BOOST_HAS_THREADS: (not defined)\n"; #endif -#if defined(BOOST_SP_USE_QUICK_ALLOCATOR) - std::cout << "BOOST_SP_USE_QUICK_ALLOCATOR: (defined)\n"; -#else - std::cout << "BOOST_SP_USE_QUICK_ALLOCATOR: (not defined)\n"; -#endif - #if defined(BOOST_QA_PAGE_SIZE) std::cout << "BOOST_QA_PAGE_SIZE: " << BOOST_QA_PAGE_SIZE << "\n"; #else