|
RPNX::DataStructures
Header-only C++ data structures and supporting utilities.
|
Random-access iterator adapter with bidirectional range checks. More...
#include <iterator.hpp>
Public Member Functions | |
| bidirectional_bounded_iterator ()=default | |
| Constructs value-initialized current, first, and last iterators. | |
| constexpr | bidirectional_bounded_iterator (It current, It first, It last) |
| Constructs a bounded adapter over an underlying range. | |
| constexpr reference | operator* () const |
| Dereferences the current position. | |
| constexpr pointer | operator-> () const |
| Accesses the current element. | |
| constexpr bidirectional_bounded_iterator & | operator++ () |
| Advances one position. | |
| constexpr bidirectional_bounded_iterator | operator++ (int) |
| Advances one position. | |
| constexpr bidirectional_bounded_iterator & | operator-- () |
| Retreats one position. | |
| constexpr bidirectional_bounded_iterator | operator-- (int) |
| Retreats one position. | |
| constexpr bidirectional_bounded_iterator & | operator+= (difference_type n) |
| Moves by an offset with range checking. | |
| constexpr bidirectional_bounded_iterator & | operator-= (difference_type n) |
| Moves backward by an offset with range checking. | |
| constexpr bidirectional_bounded_iterator | operator+ (difference_type n) const |
| Returns an iterator moved by an offset. | |
| constexpr bidirectional_bounded_iterator | operator- (difference_type n) const |
| Returns an iterator moved backward by an offset. | |
| constexpr reference | operator[] (difference_type n) const |
| Dereferences an offset position. | |
| constexpr difference_type | operator- (const bidirectional_bounded_iterator &other) const |
| Computes the distance from another iterator. | |
| constexpr bool | operator== (const bidirectional_bounded_iterator &other) const |
| Compares positions for equality. | |
| constexpr bool | operator!= (const bidirectional_bounded_iterator &other) const |
| Compares positions for inequality. | |
| constexpr bool | operator< (const bidirectional_bounded_iterator &other) const |
| Tests whether this position precedes another. | |
| constexpr bool | operator> (const bidirectional_bounded_iterator &other) const |
| Tests whether this position follows another. | |
| constexpr bool | operator<= (const bidirectional_bounded_iterator &other) const |
| Tests whether this position does not follow another. | |
| constexpr bool | operator>= (const bidirectional_bounded_iterator &other) const |
| Tests whether this position does not precede another. | |
Friends | |
| constexpr bidirectional_bounded_iterator | operator+ (difference_type n, const bidirectional_bounded_iterator &it) |
| Returns an iterator moved by an offset. | |
Random-access iterator adapter with bidirectional range checks.
Dereference and movement operations validate the closed position range [first, last], with last retained as a non-dereferenceable end position. All three wrapped iterators must belong to the same range and must outlive this non-owning adapter.
| It | Random-access iterator type to wrap. |
|
inlineconstexpr |
Constructs a bounded adapter over an underlying range.
| current | Current position in [first, last]. |
| first | First dereferenceable position. |
| last | Non-dereferenceable end position. |
|
inlineconstexpr |
Compares positions for inequality.
| other | Iterator to compare. |
true when positions differ.
|
inlineconstexpr |
Dereferences the current position.
| std::out_of_range | if the current position is outside [first, last). |
|
inlineconstexpr |
Returns an iterator moved by an offset.
| n | Signed offset. |
| std::out_of_range | if the result is outside [first, last]. |
|
inlineconstexpr |
Advances one position.
| std::out_of_range | if already at or beyond last. |
|
inlineconstexpr |
Advances one position.
| std::out_of_range | if already at or beyond last. |
|
inlineconstexpr |
Moves by an offset with range checking.
| n | Signed offset. |
| std::out_of_range | if the result is outside [first, last]. |
|
inlineconstexpr |
Computes the distance from another iterator.
| other | Iterator in the same range. |
|
inlineconstexpr |
Returns an iterator moved backward by an offset.
| n | Signed offset. |
|
inlineconstexpr |
Retreats one position.
| std::out_of_range | if already at or before first. |
|
inlineconstexpr |
Retreats one position.
| std::out_of_range | if already at or before first. |
|
inlineconstexpr |
Moves backward by an offset with range checking.
| n | Signed offset. |
| std::out_of_range | if the result is outside [first, last]. |
|
inlineconstexpr |
Accesses the current element.
| std::out_of_range | if the current position is outside [first, last). |
|
inlineconstexpr |
Tests whether this position precedes another.
| other | Iterator in the same range. |
|
inlineconstexpr |
Tests whether this position does not follow another.
| other | Iterator in the same range. |
|
inlineconstexpr |
Compares positions for equality.
| other | Iterator to compare. |
true when positions are equal.
|
inlineconstexpr |
Tests whether this position follows another.
| other | Iterator in the same range. |
|
inlineconstexpr |
Tests whether this position does not precede another.
| other | Iterator in the same range. |
|
inlineconstexpr |
Dereferences an offset position.
| n | Signed offset. |
| std::out_of_range | if the offset position is not dereferenceable. |
|
friend |
Returns an iterator moved by an offset.
| n | Signed offset. |
| it | Iterator to shift. |