Add dummy allocator utility to be able to use allocator_traits machinery without instantiating a real allocator

This commit is contained in:
Ion Gaztañaga
2025-11-24 21:25:04 +01:00
parent aca13505b8
commit 68914708b2

View File

@@ -86,6 +86,15 @@ namespace boost {
namespace container {
namespace dtl {
template <class T>
class allocator_traits_dummy
{
public:
typedef T value_type;
T *allocate(std::size_t){ return 0; }
void deallocate(T *, std::size_t){}
};
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template<class T, class ...Args>