A ReversibleContainer is a Container that has iterators that meet the requirements of either LegacyBidirectionalIterator or LegacyRandomAccessIterator. Such iterators allow a ReversibleContainer to be iterated over in reverse.
[edit] RequirementsA type satisfies ReversibleContainer if it satisfies Container, its iterator type belongs to the bidirectional or random access iterator categories and, given the following types and values, the semantic and complexity requirements in the tables below are satisfied:
Type DefinitionX
an ReversibleContainer type T
the value_type
of X
Value Definition a a value of type X
[edit] Types [edit] Expressions
The types reverse_iterator
and const_reverse_iterator
in the following table denote typename X::reverse_iterator and typename X::const_reverse_iterator respectively.
reverse_iterator
const_reverse_iterator
for constant a reverse_iterator(a.end()) Constant a.rend() reverse_iterator
const_reverse_iterator
for constant a reverse_iterator(a.begin()) Constant a.crbegin() const_reverse_iterator
const_cast<const X&>(a).rbegin() Constant a.crend() const_reverse_iterator
const_cast<const X&>(a).rend() Constant [edit] Library types
The following standard library types satisfy ReversibleContainer requirements:
fixed-sized inplace contiguous arrayThe following behavior-changing defect reports were applied retroactively to previously published C++ standards.
DR Applied to Behavior as published Correct behavior LWG 2105 C++98 typename X::const_reverse_iterator wasT
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4