From 2e28eb2b5d5123e037eadec9996a44268d515e7c Mon Sep 17 00:00:00 2001 From: Anthony Eden Date: Thu, 5 Dec 2024 13:52:24 -0800 Subject: [PATCH] Support stateful allocators --- include/boost/dynamic_bitset/dynamic_bitset.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/dynamic_bitset/dynamic_bitset.hpp b/include/boost/dynamic_bitset/dynamic_bitset.hpp index 06ec9712..2ed67ec6 100644 --- a/include/boost/dynamic_bitset/dynamic_bitset.hpp +++ b/include/boost/dynamic_bitset/dynamic_bitset.hpp @@ -730,7 +730,7 @@ dynamic_bitset(dynamic_bitset&& b) : m_bits(boost::move(b.m_bits)), m_num_bits(boost::move(b.m_num_bits)) { // Required so that assert(m_check_invariants()); works. - assert((b.m_bits = buffer_type()).empty()); + assert((b.m_bits = buffer_type(get_allocator())).empty()); b.m_num_bits = 0; } @@ -743,7 +743,7 @@ operator=(dynamic_bitset&& b) m_bits = boost::move(b.m_bits); m_num_bits = boost::move(b.m_num_bits); // Required so that assert(m_check_invariants()); works. - assert((b.m_bits = buffer_type()).empty()); + assert((b.m_bits = buffer_type(get_allocator())).empty()); b.m_num_bits = 0; return *this; }