SysTutorials

Linux Manual Pages › Section 3

stdexperimentalrangesincrementable(3)

std::experimental::ranges::Incrementable - std::experimental::ranges::Incrementable

Synopsis

Defined in header <experimental/ranges/iterator>
template <class I>
concept bool Incrementable =
Regular<I> &&
WeaklyIncrementable<I> &&                         (ranges TS)
requires(I i) {
    { i++ } -> Same<I>&&;
};

The concept Incrementable<I> specifies the requirements on a type that can be incremented (with the pre- and post-increment operators). The increment operations (including those required by WeaklyIncrementable) are required to be equality-preserving, and the type is required to be EqualityComparable. Let a and b be incrementable objects of type I. Incrementable<I> is satisfied only if:

Notes

The requirement that a equals b implies ++a equals ++b allows the use of multi-pass algorithms with Incrementable types.