Skip to content

Commit

Permalink
Support stateful allocators
Browse files Browse the repository at this point in the history
  • Loading branch information
aleden authored and jeking3 committed Dec 24, 2024
1 parent cd59d32 commit 41d0897
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/boost/dynamic_bitset/dynamic_bitset.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ dynamic_bitset(dynamic_bitset<Block, Allocator>&& 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;
}

Expand All @@ -743,7 +743,7 @@ operator=(dynamic_bitset<Block, Allocator>&& 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;
}
Expand Down

0 comments on commit 41d0897

Please sign in to comment.