A LegacyBidirectionalIterator is a LegacyForwardIterator that can be moved in both directions (i.e. incremented and decremented).
If a LegacyBidirectionalIterator it originates from a Container, then it's value_type
is the same as the container's, so dereferencing (*it) obtains the container's value_type
.
The type It
satisfies LegacyBidirectionalIterator if
It
satisfies LegacyForwardIteratorAnd, given
It
reference
, the type denoted by std::iterator_traits<It>::referenceThe following expressions must be valid and have their specified effects:
Expression Return Equivalent expression Notes --aIt&
Preconditions:
Postconditions:
--a;
reference
A mutable LegacyBidirectionalIterator is a LegacyBidirectionalIterator that additionally satisfies the LegacyOutputIterator requirements.
[edit] NotesThe begin iterator is not decrementable and the behavior is undefined if --container.begin() is evaluated.
A bidirectional iterator does not have to be dereferenceable to be decrementable (in particular, the end iterator is not dereferenceable but is decrementable).
ConceptFor the definition of std::iterator_traits, the following exposition-only concept is defined.
where the exposition-only concept __LegacyForwardIterator
is described in LegacyForwardIterator.
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
DR Applied to Behavior as published Correct behavior LWG 299T
changed the return
reference
[1] LWG 383 C++98 b was required to be dereferenceable after --a a is required to be dereferenceable instead LWG 1212
reference
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