Skip to content

Commit ca06119

Browse files
committed
Remove the dependency on core/allocator_access.hpp
1 parent fae1e7f commit ca06119

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

include/boost/dynamic_bitset/detail/dynamic_bitset.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#define BOOST_DETAIL_DYNAMIC_BITSET_HPP
1818

1919
#include "boost/config.hpp"
20-
#include "boost/core/allocator_access.hpp"
2120
#include <cstddef>
2221
#include <memory>
2322
#include <type_traits>
@@ -109,8 +108,8 @@ vector_max_size_workaround( const T & v )
109108

110109
const allocator_type & alloc = v.get_allocator();
111110

112-
typename boost::allocator_size_type< allocator_type >::type alloc_max =
113-
boost::allocator_max_size( alloc );
111+
typename std::allocator_traits< allocator_type >::size_type alloc_max =
112+
std::allocator_traits< allocator_type >::max_size( alloc );
114113

115114
const typename T::size_type container_max = v.max_size();
116115
return alloc_max < container_max ? alloc_max : container_max;

test/bitset_test.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ struct bitset_test
355355
{
356356
BOOST_TEST( b.max_size() > 0 );
357357
BOOST_TEST( b.max_size() >= b.size() );
358-
BOOST_TEST( b.max_size() / Bitset::bits_per_block <= boost::allocator_max_size( b.get_allocator() ) );
358+
BOOST_TEST( b.max_size() / Bitset::bits_per_block <= std::allocator_traits< typename Bitset::allocator_type >::max_size( b.get_allocator() ) );
359359
}
360360

361361
// move constructor (absent from std::bitset)

0 commit comments

Comments
 (0)