Template Struct RandomAccessible

Inheritance Relationships

Base Type

Struct Documentation

template<typename TUnderlying>
struct RandomAccessible : public t8_crtp_operator<TUnderlying, RandomAccessible>

A template for random accessible types.

Provides the [] operator.

Template Parameters:

TUnderlying

Public Functions

inline auto operator[](std::size_t index) -> decltype(auto)

Get the element at the given index.

Parameters:

index[in] The index of the element to get.

Returns:

The element at the given index.

inline auto operator[](std::size_t index) const -> decltype(auto)

Get the element at the given index.

Parameters:

index[in] The index of the element to get.

Returns:

The element at the given index.

inline auto begin() -> decltype(auto)

Get an iterator to the beginning of the underlying type.

Returns:

An iterator to the beginning of the underlying type.

inline auto begin() const -> decltype(auto)

Get an iterator to the begin of the underlying type.

Returns:

An iterator to the begin of the underlying type.

inline auto end() -> decltype(auto)

Get an iterator to the end of the underlying type.

Returns:

An iterator to the end of the underlying type.

inline auto end() const -> decltype(auto)

Get an iterator to the end of the underlying type.

Returns:

An iterator to the end of the underlying type.

inline auto data() -> decltype(auto)

Get a pointer to the data of the underlying type.

Returns:

A pointer to the data of the underlying type.

inline auto data() const -> decltype(auto)

Get a pointer to the data of the underlying type.

Returns:

A pointer to the data of the underlying type.