| | |
| (1) | (since C++20) |
| (2) | (since C++23) |
| (3) | (since C++20) |
| (4) | (since C++23) |
| | |
1) Used to obtain the iterator type of the typeT.
2) Used to obtain the constant iterator type of the
range type
R.
3) Used to obtain the sentinel type of the range typeR.
4) Used to obtain the constant sentinel type of the range typeR.
[edit]Template parameters
iterator_t can be applied to non-range types, e.g. arrays with unknown bound.
[edit]Defect reports
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
| DR | Applied to | Behavior as published | Correct behavior |
|---|
| LWG 3946 | C++23 | const_iterator_t andconst_sentinel_t were inconsistent with the result ofranges::cbegin andranges::cend respectively | tweaked |
[edit]See also
(C++20)(C++20)(C++23)(C++20)(C++20)(C++20) | computes the associated types of an iterator (alias template)[edit] |
| obtains size, difference, and value types of a range (alias template)[edit] |
(C++20)(C++23)(C++20)(C++20) | obtains reference types of a range (alias template)[edit] |