mirror of
https://github.com/boostorg/dynamic_bitset.git
synced 2026-01-19 04:12:09 +00:00
Fix compilation with standard libraries implementations which use raw pointers as iterators
This commit is contained in:
committed by
Gennaro Prota
parent
9b64641093
commit
75d3e4d83d
@@ -1426,13 +1426,13 @@ template< typename Iterator >
|
||||
class bit_iterator_base
|
||||
{
|
||||
public:
|
||||
typedef typename Iterator::iterator_category iterator_category;
|
||||
typedef typename std::iterator_traits< Iterator >::iterator_category iterator_category;
|
||||
typedef bool value_type;
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef value_type * pointer;
|
||||
typedef value_type & reference;
|
||||
|
||||
static constexpr int bits_per_block = std::numeric_limits< typename Iterator::value_type >::digits;
|
||||
static constexpr int bits_per_block = std::numeric_limits< typename std::iterator_traits< Iterator >::value_type >::digits;
|
||||
|
||||
BOOST_DYNAMIC_BITSET_CONSTEXPR20 bit_iterator_base( Iterator block_iterator, int bit_index );
|
||||
|
||||
@@ -1446,7 +1446,7 @@ public:
|
||||
protected:
|
||||
BOOST_DYNAMIC_BITSET_CONSTEXPR20 void increment();
|
||||
BOOST_DYNAMIC_BITSET_CONSTEXPR20 void decrement();
|
||||
BOOST_DYNAMIC_BITSET_CONSTEXPR20 void add( typename Iterator::difference_type n );
|
||||
BOOST_DYNAMIC_BITSET_CONSTEXPR20 void add( typename std::iterator_traits< Iterator >::difference_type n );
|
||||
|
||||
Iterator m_block_iterator;
|
||||
int m_bit_index = 0;
|
||||
|
||||
@@ -185,7 +185,7 @@ bit_iterator_base< Iterator >::decrement()
|
||||
|
||||
template< typename Iterator >
|
||||
BOOST_DYNAMIC_BITSET_CONSTEXPR20 void
|
||||
bit_iterator_base< Iterator >::add( typename Iterator::difference_type n )
|
||||
bit_iterator_base< Iterator >::add( typename std::iterator_traits< Iterator >::difference_type n )
|
||||
{
|
||||
typename Iterator::difference_type d = m_bit_index + n;
|
||||
m_block_iterator += d / bits_per_block;
|
||||
|
||||
Reference in New Issue
Block a user