Make buffer_type public

Reason: Failures from GCC and Clang. See the new code comment.
This commit is contained in:
Gennaro Prota
2025-09-10 11:19:05 +02:00
parent 6747f81566
commit 0ca460971e
2 changed files with 11 additions and 5 deletions

View File

@@ -16,6 +16,7 @@ exclude-symbols:
- 'boost::detail::**'
- 'boost::to_string_helper'
- 'boost::dynamic_bitset::bit_appender'
- 'boost::dynamic_bitset::buffer_type'
file-patterns:
- '*.hpp'
multipage: true

View File

@@ -84,11 +84,6 @@ template< typename Block, typename AllocatorOrContainer >
class dynamic_bitset
{
BOOST_STATIC_ASSERT( (bool)detail::dynamic_bitset_impl::allowed_block_type< Block >::value );
typedef typename std::conditional<
detail::dynamic_bitset_impl::is_container< AllocatorOrContainer, Block >::value,
AllocatorOrContainer,
std::vector< Block, AllocatorOrContainer >
>::type buffer_type;
public:
//! The same type as `Block`.
@@ -105,6 +100,16 @@ public:
// -----------------------------------------------------------------------
typedef std::size_t size_type;
//! Note: Made public to cope with failures from many GCC and
//! Clang versions which seem to ignore the friend declarations
//! of `bit_iterator` and `const_bit_iterator`.
// -----------------------------------------------------------------------
typedef typename std::conditional<
detail::dynamic_bitset_impl::is_container< AllocatorOrContainer, Block >::value,
AllocatorOrContainer,
std::vector< Block, AllocatorOrContainer >
>::type buffer_type;
//! The number of bits the type `Block` uses to represent
//! values, excluding any padding bits. Numerically equal to
//! `std::numeric_limits< Block >::digits`.