| Iterator concepts | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Iterator primitives | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Algorithm concepts and utilities | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Indirect callable concepts | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Common algorithm requirements | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Utilities | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Iterator adaptors | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
counted_iterator::operator= | ||||
| Non-member functions | ||||
(C++20)(C++20) | ||||
(C++20) | ||||
(C++20) | ||||
(C++20) | ||||
(C++20) | ||||
| Helper classes | ||||
template<class I2> requiresstd::assignable_from<I&,const I2&> | (since C++20) | |
The underlying iterator andlength are assigned with those ofother.
Contents |
| other | - | iterator adaptor to assign from |
*this
#include <algorithm>#include <cassert>#include <initializer_list>#include <iterator> int main(){auto a={3,1,4,1,5,9,2};std::counted_iterator<std::initializer_list<int>::iterator> p(begin(a), size(a)-2);std::counted_iterator<std::initializer_list<int>::iterator> q;assert(q.count()==0);assert(q.count()!= p.count()); q= p;assert(q.count()== p.count());assert(std::ranges::equal(p,std::default_sentinel, q,std::default_sentinel));}
constructs a newcounted_iterator(public member function)[edit] |