|
| constexpr | ShiftedAccessor (const Accessor &accessor) |
| | Constructor from a given accessor.
|
| constexpr | ShiftedAccessor (Accessor &&accessor) |
| | Constructor from a given accessor.
|
| constexpr | ShiftedAccessor (const ShiftedAccessor< T, shift, Accessor > &other) |
| | Shallow copy constructor.
|
| constexpr | ShiftedAccessor (ShiftedAccessor< T, shift, Accessor > &&other) |
| | Shallow move constructor.
|
| constexpr decltype(auto) | operator[] (size_t idx) |
| | Element access operator.
|
| constexpr decltype(auto) | operator[] (size_t idx) const |
| | Element access operator.
|
template<typename
T, size_t shift, ValidAccessor<
T > Accessor>
class mundy::ShiftedAccessor< T, shift, Accessor >
Concept: Sometimes we'd like to access a contiguous accessor (with only a [] operator) but with a shift. That is, instead of calling accessor[i], we'd like to call accessor[i + shift]. This class provides a way to do that.
- Template Parameters
-
| T | The type of the elements |
| shift | The shift in the accessor |
| Accessor | The type of the contiguous accessor |