Adaptor that produces a standard bidirectional iterator from a core type.
Declared in <bslstl_bidirectionaliterator.h>
template<
class T,
class ITER_IMP,
class TAG_TYPE = std::bidirectional_iterator_tag>
class BidirectionalIterator
: public ForwardIterator<T, ITER_IMP, TAG_TYPE>
Given an ITER_IMP type that implements a minimal subset of an iterator interface, this template generates a complete iterator that meets all of the requirements of a "bidirectional iterator" in the C++ standard. If T is const-qualified, then the resulting type is a constant iterator. T shall not be a function, reference type or void. ITER_IMP must provide public operations so that, for objects i and j of type ITER_IMP, the following operations are supported: ` ITER_IMP i; default construction ITER_IMP j(i); copy construction i = j assignment ++i increment to next element --i decrement to previous element i == j // convertible to bool equality comparison *i // reference convertible to T& element access (dereference) `
| Name | Description |
|---|---|
ForwardIterator<T, ITER_IMP, TAG_TYPE> | STL-compliant forward iterator adapted from a minimal implementation. |
| Name | Description |
|---|---|
difference_type | Type of the distance between two iterators. |
iterator_category | Standard iterator category tag for bidirectional iterators. |
pointer | Pointer type for the iterator's element type. |
reference | Reference type for the iterator's element type. |
value_type | Type of the value obtained when dereferencing the iterator. |
| Name | Description |
|---|---|
BidirectionalIterator [constructor] | Constructors |
operator= | Assignment operators |
imp | imp overloads |
operator* | Return a reference to the current element. |
operator++ | Advance this iterator to the next element. |
operator-- | Regress this iterator to the previous element. |
operator-> | Return a pointer to the current element. |
| Name | Description |
|---|---|
operator!= | Return true if lhs and rhs do not have the same value. |
operator!= | Return whether two bidirectional iterators refer to different positions. |
operator++ | Advance iter to the next element and return its previous value. |
operator++ | Post-increment the specified iterator and return its previous value. |
operator-- | Post-decrement the specified iterator and return its previous value. |
operator== | Return true if lhs and rhs have the same value. |
operator== | Return whether two bidirectional iterators refer to the same position. |
| Name | Description |
|---|---|
RandomAccessIterator | STL-compliant random-access iterator adapted from a minimal implementation. |