kblib 0.2.3
General utilities library for modern C++
|
A helper struct which acts as an iterator for the range elements, as they are generated on the fly. More...
#include <kblib/iterators.h>
Public Types | |
using | difference_type = std::ptrdiff_t |
using | value_type = Value |
using | pointer = const Value * |
using | reference = Value |
using | iterator_category = std::input_iterator_tag |
Public Member Functions | |
constexpr auto | operator* () const noexcept(nothrow_copyable) -> Value |
Return the "pointed-to" value. More... | |
constexpr auto | operator-> () const noexcept -> pointer |
Return a pointer to the value. More... | |
constexpr auto | operator++ () &noexcept(nothrow_steppable) -> iterator & |
Prefix increment. Advance to the next value in the range. More... | |
constexpr auto | operator++ (int) noexcept(nothrow_steppable) -> iterator |
Postfix increment. Advance to the next value in the range, but return the current value. More... | |
constexpr auto | operator[] (std::ptrdiff_t x) const noexcept -> Value |
template<typename Integral > | |
constexpr auto | operator[] (Integral x) const noexcept -> Value |
Public Attributes | |
Value | val |
Delta | step |
Friends | |
constexpr friend auto | operator== (iterator l, iterator r) noexcept -> bool |
Compare two range iterators for equality. More... | |
constexpr friend auto | operator!= (iterator l, iterator r) noexcept -> bool |
Compare two range iterators for inequality. More... | |
constexpr friend auto | operator< (iterator l, iterator r) noexcept -> bool |
Compare two range iterators. More... | |
constexpr friend auto | operator<= (iterator l, iterator r) noexcept -> bool |
Compare two range iterators. More... | |
constexpr friend auto | operator> (iterator l, iterator r) noexcept -> bool |
Compare two range iterators. More... | |
constexpr friend auto | operator>= (iterator l, iterator r) noexcept -> bool |
Compare two range iterators. More... | |
A helper struct which acts as an iterator for the range elements, as they are generated on the fly.
Definition at line 259 of file iterators.h.
using kblib::range_t< Value, Delta >::iterator::difference_type = std::ptrdiff_t |
Definition at line 263 of file iterators.h.
using kblib::range_t< Value, Delta >::iterator::iterator_category = std::input_iterator_tag |
Definition at line 267 of file iterators.h.
using kblib::range_t< Value, Delta >::iterator::pointer = const Value* |
Definition at line 265 of file iterators.h.
using kblib::range_t< Value, Delta >::iterator::reference = Value |
Definition at line 266 of file iterators.h.
using kblib::range_t< Value, Delta >::iterator::value_type = Value |
Definition at line 264 of file iterators.h.
|
inlineconstexprnoexcept |
Return the "pointed-to" value.
Definition at line 274 of file iterators.h.
|
inlineconstexprnoexcept |
Prefix increment. Advance to the next value in the range.
Definition at line 289 of file iterators.h.
|
inlineconstexprnoexcept |
Postfix increment. Advance to the next value in the range, but return the current value.
Definition at line 299 of file iterators.h.
|
inlineconstexprnoexcept |
Return a pointer to the value.
Definition at line 283 of file iterators.h.
|
inlineconstexprnoexcept |
Definition at line 369 of file iterators.h.
|
inlineconstexprnoexcept |
Definition at line 365 of file iterators.h.
|
friend |
Compare two range iterators for inequality.
Range iterators compare equal if they point to the same value and have the same step.
Definition at line 320 of file iterators.h.
|
friend |
Compare two range iterators.
For range iterators, (A < B) is true when A can be advanced until (*A - *B) changes sign.
Definition at line 330 of file iterators.h.
|
friend |
Compare two range iterators.
For range iterators, (A < B) is true when A can be advanced until (*A - *B) changes sign.
Definition at line 342 of file iterators.h.
|
friend |
Compare two range iterators for equality.
Range iterators compare equal if they point to the same value and have the same step.
Definition at line 310 of file iterators.h.
|
friend |
Compare two range iterators.
For range iterators, (A < B) is true when A can be advanced until (*A - *B) changes sign.
Definition at line 352 of file iterators.h.
|
friend |
Compare two range iterators.
For range iterators, (A < B) is true when A can be advanced until (*A - *B) changes sign.
Definition at line 361 of file iterators.h.
Delta kblib::range_t< Value, Delta >::iterator::step |
Definition at line 261 of file iterators.h.
Value kblib::range_t< Value, Delta >::iterator::val |
Definition at line 260 of file iterators.h.