std::incrementable

Header: <iterator>

This concept specifies requirements on types that can be incremented with the pre- and post-increment operators, whose increment operations are equality-preserving, and the type is std::equality_comparable.

# Declarations

template< class I >
concept incrementable =
std::regular<I> &&
std::weakly_incrementable<I> &&
requires(I i) {
{ i++ } -> std::same_as<I>;
};

(since C++20)

# See also