From 68914708b2edc36af9503b45454ba302ccb04950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Mon, 24 Nov 2025 21:25:04 +0100 Subject: [PATCH] Add dummy allocator utility to be able to use allocator_traits machinery without instantiating a real allocator --- include/boost/container/allocator_traits.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/boost/container/allocator_traits.hpp b/include/boost/container/allocator_traits.hpp index 712ab29..95b1fa3 100644 --- a/include/boost/container/allocator_traits.hpp +++ b/include/boost/container/allocator_traits.hpp @@ -86,6 +86,15 @@ namespace boost { namespace container { namespace dtl { +template +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