| Iterator concepts | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Iterator primitives | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Algorithm concepts and utilities | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Indirect callable concepts | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Common algorithm requirements | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Utilities | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Iterator adaptors | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
| Non-member functions | ||||
(C++20)(C++20) | ||||
(C++20) | ||||
(C++20) | ||||
operator-(default_sentinel_t) (C++20) | ||||
(C++20) | ||||
(C++20) | ||||
| Helper classes | ||||
friendconstexprstd::iter_difference_t<I> operator-( const counted_iterator& x,std::default_sentinel_t); | (1) | (since C++20) |
friendconstexprstd::iter_difference_t<I> operator-( std::default_sentinel_t,const counted_iterator& y); | (2) | (since C++20) |
This function template is not visible to ordinaryunqualified orqualified lookup, and can only be found byargument-dependent lookup when std::counted_iterator<I> is an associated class of the arguments.
Contents |
| x, y | - | iterator adaptors to compute the difference of |
#include <initializer_list>#include <iterator> int main(){constexprstaticauto v={1,2,3,4};constexprstd::counted_iterator<std::initializer_list<int>::iterator> it{v.begin(),3};constexprauto d1= it-std::default_sentinel; static_assert(d1==-3);// (1)constexprauto d2=std::default_sentinel- it; static_assert(d2==+3);// (2)}
advances or decrements thecounted_iterator(public member function)[edit] | |
(C++20) | advances the iterator (function template)[edit] |
(C++20) | computes the distance between two iterator adaptors (function template)[edit] |
(C++20) | default sentinel for use with iterators that know the bound of their range (class)[edit] |