Deprecate old construct/destroy functions

This commit is contained in:
Ion Gaztañaga
2026-01-11 01:14:46 +01:00
parent 59d8aa6328
commit 8c7e4a4fba

View File

@@ -450,11 +450,13 @@ class array_allocation_impl
//!Throws if T's constructor throws
//!For backwards compatibility with libraries using C++03 allocators
template<class P>
BOOST_DEPRECATED("This function is deprecated and will be removed in the future")
void construct(const pointer &ptr, BOOST_FWD_REF(P) p)
{ ::new((void*)ipcdetail::to_raw_pointer(ptr), boost_container_new_t()) value_type(::boost::forward<P>(p)); }
//!Destroys object. Throws if object's
//!destructor throws
BOOST_DEPRECATED("This function is deprecated and will be removed in the future")
void destroy(const pointer &ptr)
{ BOOST_ASSERT(ptr != 0); (*ptr).~value_type(); }
};