mirror of
https://github.com/boostorg/dynamic_bitset.git
synced 2026-01-21 04:52:10 +00:00
Compare commits
3 Commits
boost-1.90
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
75d3e4d83d | ||
|
|
9b64641093 | ||
|
|
54c841d585 |
@@ -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 );
|
||||
|
||||
@@ -1440,11 +1440,13 @@ public:
|
||||
friend BOOST_DYNAMIC_BITSET_CONSTEXPR20 bool operator==( const bit_iterator_base< Iter > & lhs, const bit_iterator_base< Iter > & rhs );
|
||||
template< typename Iter >
|
||||
friend BOOST_DYNAMIC_BITSET_CONSTEXPR20 bool operator<( const bit_iterator_base< Iter > & lhs, const bit_iterator_base< Iter > & rhs );
|
||||
template< typename Iter >
|
||||
friend BOOST_DYNAMIC_BITSET_CONSTEXPR20 difference_type operator-( const bit_iterator_base< Iter > & lhs, const bit_iterator_base< Iter > & rhs );
|
||||
|
||||
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;
|
||||
|
||||
@@ -248,6 +248,8 @@ struct bitset_test
|
||||
BOOST_TEST( *( 1 + b.begin() ) == b[ 1 ] );
|
||||
BOOST_TEST( *( b.end() - 1 ) == b[ b.size() - 1 ] );
|
||||
}
|
||||
|
||||
BOOST_TEST( b.end() - b.begin() == static_cast< std::ptrdiff_t >( b.size() ) );
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user