Iterator used by Disjoint_pairs_interface and Disjoint_pairs_view: this yields the disjoint, adjacent pairs of values from the source iterator.
More...
|
| | Disjoint_pairs_iterator () noexcept=default |
| | Default constructor, which leaves the object in a state that is not usable, except it can be assigned to. More...
|
| |
| | Disjoint_pairs_iterator (const Source_iterator_t &position) noexcept |
| | Construct a new iterator, where the first component points to the given position. More...
|
| |
| Value_t | get () const |
| |
| void | next () |
| | Move to the next position. More...
|
| |
| void | prev () |
| | Move to the previous position. More...
|
| |
| void | advance (std::ptrdiff_t delta) |
| | Move the iterator the given number of steps. More...
|
| |
| std::ptrdiff_t | distance_from (const Disjoint_pairs_iterator &other) const |
| |
| bool | is_equal (const Disjoint_pairs_iterator &other) const |
| |
| decltype(auto) | operator* () const |
| | Dereference operator, which returns the current value. More...
|
| |
| auto | operator-> () const |
| | Arrow operator, return a pointer (possibly a fancy pointer) to the current element. More...
|
| |
| Self_t & | operator++ () |
| | Pre-increment operator, which advances the position one step and returns a reference to the iterator itself. More...
|
| |
| auto | operator++ (int) |
| | Post-increment operator, which advances the position one step. More...
|
| |
| Self_t & | operator-- () |
| | Pre-decrement iterator, which moves one step back and returns a reference to the iterator itself. More...
|
| |
| auto | operator-- (int) |
| | Post-decrement operator, which moves one step back and returns a copy of the iterator before the decrement. More...
|
| |
| Self_t & | operator+= (std::ptrdiff_t delta) |
| | Addition assignment operator, which moves the iterator forward by the given number of steps, and returns a reference to the iterator itself. More...
|
| |
| Self_t & | operator-= (std::ptrdiff_t delta) |
| | Subtraction assignment operator, which moves the iterator backward by the given number of steps, and returns a reference to the iterator itself. More...
|
| |
| Self_t | operator+ (std::ptrdiff_t delta) const |
| | Addition operator, which returns a new iterator that is the given number of steps ahead of the current iterator. More...
|
| |
| Self_t | operator- (std::ptrdiff_t delta) const |
| | Subtraction-of-integer operator, which returns a new iterator that is the given number of steps behind of the current iterator. More...
|
| |
| std::ptrdiff_t | operator- (const Self_t &other) const |
| | Subtraction-of-iterator operator, which returns the number of steps from other this. More...
|
| |
| decltype(auto) | operator[] (std::ptrdiff_t delta) const |
| | Subscript operator, which returns a new iterator that is the given number of steps ahead of the current iterator. More...
|
| |
template<std::forward_iterator Source_iterator_tp, class Make_pair_tp = detail::Make_pair>
class mysql::ranges::Disjoint_pairs_iterator< Source_iterator_tp, Make_pair_tp >
Iterator used by Disjoint_pairs_interface and Disjoint_pairs_view: this yields the disjoint, adjacent pairs of values from the source iterator.
This caches two iterator positions internally. It returns the pairs by value.
- Template Parameters
-
| Source_iterator_tp | The source iterator. |
| Make_pair_tp | Function object that creates a pair from two input values. By default, uses a function object that creates std::pair objects. |
template<std::forward_iterator Source_iterator_tp, class Make_pair_tp = detail::Make_pair>
Iterator to the second position.
This is mutable because it is only a cache and gets updated lazily.
(We cannot update this member when advancing the iterator, because that would make it advance past the past-the-end iterator, which is undefined behavior. Instead we unset it, and initialize it on the next dereference operation.)