37 #include <type_traits> 39 #include <boost/iterator/iterator_adaptor.hpp> 51 template <
class BaseIter>
53 template <
class BaseIter>
63 template <
class BaseIter>
70 return std::numeric_limits<
typename std::make_unsigned<
71 typename std::iterator_traits<BaseIter>::value_type>
::type>::digits;
79 : bititerator_detail::BitIteratorBase<BaseIter>::
type(iter),
90 ++this->base_reference();
104 typename std::iterator_traits<BaseIter>::reference,
105 typename std::iterator_traits<BaseIter>::value_type>
119 ssize_t blocks = n / ssize_t(bpb);
125 this->base_reference() += blocks;
137 --this->base_reference();
141 bool equal(
const BitIterator& other)
const {
144 this->base_reference() == other.base_reference());
149 (other.base_reference() - this->base_reference()) *
bitsPerBlock() +
160 template <
class BaseIter>
169 template <
class BaseIter>
174 static const typename std::iterator_traits<BaseIter>::value_type one = 1;
176 while (begin.base() != end.base()) {
177 typename std::iterator_traits<BaseIter>::value_type
v = *begin.base();
192 typename std::iterator_traits<BaseIter>::value_type
v = *begin.base();
static unsigned int bitsPerBlock()
void advanceInBlock(size_t n)
BitIterator< BaseIter > findFirstSet(BitIterator< BaseIter >, BitIterator< BaseIter >)
BitIterator< BaseIter > makeBitIterator(const BaseIter &iter)
auto begin(TestAdlIterable &instance)
BitIterator(const BaseIter &iter, size_t bitOff=0)
—— Concurrent Priority Queue Implementation ——
BitRef dereference() const
bool equal(const BitIterator &other) const
bititerator_detail::BitReference< typename std::iterator_traits< BaseIter >::reference, typename std::iterator_traits< BaseIter >::value_type > BitRef
friend class boost::iterator_core_access
void advanceToNextBlock()
auto end(TestAdlIterable &instance)
BitIterator & operator=(const BaseIter &other)
ssize_t distance_to(const BitIterator &other) const
friend BitIterator findFirstSet(BitIterator, BitIterator)