Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/iterator/incrementable"

From cppreference.com
< cpp‎ | iterator
(This is my second time making one of these pages, this one seemed simple so i went for it.)
 
m (removed unnessisary "(1)")
Line 3: Line 3:
 
{{dcl begin}}
 
{{dcl begin}}
 
{{dcl header|iterator|since=c++20}}
 
{{dcl header|iterator|since=c++20}}
{{dcl | num=1 | since=c++20 | 1=
+
{{dcl | since=c++20 | 1=
 
template < class T >
 
template < class T >
 
concept incrementable = requires std::weakly_incrementable<T> &&  
 
concept incrementable = requires std::weakly_incrementable<T> &&  

Revision as of 11:12, 5 October 2019

 
 
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 T >

concept incrementable = requires std::weakly_incrementable<T> &&

                                 std::equality_comparable<T>;
(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]