class
<iterator>
std::bidirectional_iterator_tagstruct bidirectional_iterator_tag {}
Bidirectional iterator category
Empty class to identify the category of an iterator as a bidirectional iterator: Bidirectional iteratorsAll random-access iterators are also valid bidirectional iterators.
There is not a single type of bidirectional iterator: Each container may define its own specific iterator type able to iterate through it and access its elements.
Bidirectional iterators have the same properties as forward iterators, with the only difference that they can also be decremented:
property valid expressions Is default-constructible, copy-constructible, copy-assignable and destructibleX a;
X b(a);
b = a;
Can be compared for equivalence using the equality/inequality operators
a == b
a != b
Can be dereferenced as an rvalue (if in a dereferenceable state). *a
a->m
For mutable iterators (non-constant iterators):
*a = t
Can be incremented (if in a dereferenceable state).
++a
a++
*a++
Can be decremented (if a dereferenceable iterator value precedes it).
X a;
X b(a);
b = a;
Can be compared for equivalence using the equality/inequality operators
a == b
a != b
Can be dereferenced as an rvalue (if in a dereferenceable state). *a
a->m
For mutable iterators (non-constant iterators):
*a = t
Can be incremented (if in a dereferenceable state).
++a
a++
*a++
Can be decremented (if a dereferenceable iterator value precedes it).
swap(a,b)
Constant iterators are iterators that do not fulfill the requirements of an output iterator; Dereferencing them yields a reference to a constant element (such as const T&
).
All bidirectional iterators are also valid forward and input iterators.
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