|
| constexpr | ShiftedView (const Accessor &accessor) |
| | Constructor from a given accessor.
|
| constexpr | ShiftedView (Accessor &&accessor) |
| | Constructor from a given accessor.
|
| constexpr | ShiftedView (const ShiftedView< T, shift, Accessor > &other) |
| | Shallow copy constructor.
|
| constexpr | ShiftedView (ShiftedView< 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::ShiftedView< 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 |