Implementation of std::iterator_traits
for enum type TEnum . This class exposes ConstIterator which uses const TEnum*
and const TEnum&
as pointer and reference types.
As the name of the class indicates, this iterator satisfies the C++ standard library concept RandomAccessIterator .
Definition at line 235 of file iterable.hpp.
#include <iterable.hpp>
Public Method Index: | |
constexpr | TRandomAccessIterator (TEnum _p=TEnum(0)) |
constexpr bool | operator!= (TRandomAccessIterator other) const |
constexpr TEnum | operator* () const |
TRandomAccessIterator | operator+ (TIntegral n) const |
TRandomAccessIterator & | operator++ () |
TRandomAccessIterator | operator++ (int) |
TRandomAccessIterator & | operator+= (TIntegral n) |
TRandomAccessIterator | operator- (TIntegral n) const |
std::ptrdiff_t | operator- (TRandomAccessIterator other) const |
TRandomAccessIterator & | operator-- () |
TRandomAccessIterator | operator-- (int) |
TRandomAccessIterator & | operator-= (TIntegral n) |
bool | operator< (TRandomAccessIterator other) const |
bool | operator<= (TRandomAccessIterator other) const |
constexpr bool | operator== (TRandomAccessIterator other) const |
bool | operator> (TRandomAccessIterator other) const |
bool | operator>= (TRandomAccessIterator other) const |
TEnum | operator[] (std::ptrdiff_t n) const |
|
private |
Implementation of std::iterator_traits
.
Definition at line 239 of file iterable.hpp.
|
private |
Implementation of std::iterator_traits
.
Definition at line 237 of file iterable.hpp.
|
private |
Implementation of std::iterator_traits
.
Definition at line 240 of file iterable.hpp.
|
private |
Implementation of std::iterator_traits
.
Definition at line 241 of file iterable.hpp.
|
protected |
The underlying integer type.
Definition at line 248 of file iterable.hpp.
|
private |
Implementation of std::iterator_traits
.
Definition at line 238 of file iterable.hpp.
|
protected |
The actual enum element.
Definition at line 245 of file iterable.hpp.
|
inlineexplicitconstexpr |
|
inlineconstexpr |
Comparison operator.
other | The iterator to compare ourselves to. |
true
if this and given iterator are not equal, false
otherwise. Definition at line 296 of file iterable.hpp.
|
inlineconstexpr |
Retrieves the enum element that this iterator references.
Definition at line 304 of file iterable.hpp.
|
inline |
Addition.
n | The value to subtract. |
Definition at line 363 of file iterable.hpp.
|
inline |
Prefix increment operator.
Definition at line 263 of file iterable.hpp.
|
inline |
Postfix increment operator.
Definition at line 275 of file iterable.hpp.
|
inline |
Addition assignment.
n | The value to subtract. |
Definition at line 340 of file iterable.hpp.
|
inline |
Subtraction.
n | The value to subtract. |
Definition at line 374 of file iterable.hpp.
|
inline |
Difference (distance) from this iterator to the given one.
other | The iterator to subtract |
Definition at line 385 of file iterable.hpp.
|
inline |
Prefix decrement operator.
Definition at line 314 of file iterable.hpp.
|
inline |
Postfix decrement operator.
Definition at line 326 of file iterable.hpp.
|
inline |
Subtraction assignment.
n | The value to subtract. |
Definition at line 352 of file iterable.hpp.
|
inline |
Compares this iterator with the given one.
other | The iterator to compare |
true
if this iterator is smaller than other , false
otherwise. Definition at line 412 of file iterable.hpp.
|
inline |
Compares this iterator with the given one.
other | The iterator to compare |
true
if this iterator is smaller than or equal to other , false
otherwise. Definition at line 421 of file iterable.hpp.
|
inlineconstexpr |
Comparison operator.
other | The iterator to compare ourselves to. |
true
if this and given iterator are equal, false
otherwise. Definition at line 287 of file iterable.hpp.
|
inline |
Compares this iterator with the given one.
other | The iterator to compare |
true
if this iterator is greater than other , false
otherwise. Definition at line 431 of file iterable.hpp.
|
inline |
Compares this iterator with the given one.
other | The iterator to compare |
true
if this iterator is greater than or equal to other , false
otherwise. Definition at line 440 of file iterable.hpp.
|
inline |
Subscript operator.
n | The iterator to subtract |
*( (*this) + n )
. Definition at line 398 of file iterable.hpp.