SysTutorials

Linux Manual Pages › Section 3

stdexperimentalrangesbidirectionaliterator(3)

std::experimental::ranges::BidirectionalIterator - std::experimental::ranges::BidirectionalIterator

Synopsis

Defined in header <experimental/ranges/iterator>
template < class I >
concept bool BidirectionalIterator =
ForwardIterator<I> &&
DerivedFrom<ranges::iterator_category_t<I>, ranges::bidirectional_iterator_tag> &&  (ranges TS)
requires(I i) {
    { --i } -> Same<I>&;
    { i-- } -> Same<I>&&;
};

The concept BidirectionalIterator<I> refines ForwardIterator by adding the ability to move an iterator backward. A bidirectional iterator r is said to be decrementable if and only if there exists some s such that ++s == r. All decrementable iterators r shall be in the domain of the expressions –r and r–. Let a and b be decrementable objects of type I. BidirectionalIterator<I> is satisfied only if: