boost::dynamic_bitset::iterator

A read/write iterator into the bitset.

Synopsis

Declared in <boost/dynamic_bitset/dynamic_bitset.hpp>

typedef /* implementation-defined */ iterator;

Description

If AllocatorOrContainer is an allocator type, this type models the C++20 concept std::random_access_iterator; otherwise, it models the C++20 iterator concept which corresponds to the category of the iterator type of the underlying container; for instance, if the underlying container provides LegacyBidirectionalIterators, this type models std::bidirectional_iterator. If the iterators of the underlying container neither model std::random_access_iterator nor have a random‐access iterator_category, the operations which only a random‐access iterator provides (+=, ‐=, +, binary ‐, [], <, <=, > and >=) can't be used; in C++20 and later, they don't participate in overload resolution, so that, for instance, std::sized_sentinel_for is not satisfied.

The iterator_category of this type is that of the iterator type of the underlying container. However, its reference type is not a reference type (it is the proxy class reference for iterator and bool for const_iterator), so, formally, this type doesn't meet the requirements of a LegacyForwardIterator. There is no operator‐>, and the pointer type is void.

In C++14 and later, a value‐initialized iterator compares equal to any other value‐initialized iterator of the same type.

Created with MrDocs