Namespaces
Variants
Views
Actions

std::incrementable

From cppreference.com
< cpp‎ | iterator
Revision as of 11:20, 5 October 2019 by CrashTestCoder (Talk | contribs)

 
 
Iterator library
Iterator concepts
Iterator primitives
Algorithm concepts and utilities
Indirect callable concepts
Common algorithm requirements
(C++20)
(C++20)
(C++20)
Utilities
(C++20)
Iterator adaptors
Range access
(C++11)(C++14)
(C++14)(C++14)  
(C++11)(C++14)
(C++14)(C++14)  
(C++17)(C++20)
(C++17)
(C++17)
 
Defined in header <iterator>
template<class I>

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

        };
(since C++20)

The concept incrementable<T> is satisfied if and only if T is weakly_incrementable, equality preserving, and is equality_comparable.

See also

specifies that a semiregular type can be incremented with pre- and post-increment operators
(concept) [edit]
(C++20)
specifies that a type is the same as another type
(concept) [edit]