The LegacyIterator requirements describe types that can be used to identify and traverse the elements of a container.
LegacyIterator is the base set of requirements used by other iterator types: LegacyInputIterator, LegacyOutputIterator, LegacyForwardIterator, LegacyBidirectionalIterator, and LegacyRandomAccessIterator. Iterators can be thought of as an abstraction of pointers.
It satisfies LegacyIterator if.
Itsatisfies CopyConstructible, and
Itsatisfies CopyAssignable, and
Itsatisfies Destructible, and
Itsatisfy Swappable, and
std::iterator_traits<It>has member typedefs
r, an lvalue of type
It, the following expressions must be valid and have their specified effects:
Iterators for which the behavior of the expression
*i is defined are called dereferenceable.
Iterators are not dereferenceable if.
For the definition of
where the exposition-only concept
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
|DR||Applied to||Behavior as published||Correct behavior|
|LWG 3420||C++20|| the exposition-only concept checks ||
| specifies that objects of a type can be incremented and dereferenced
|Iterator library||provides definitions for iterators, iterator traits, adaptors, and utility functions|
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.