An encapsulation of an array and its size. More...
#include <playrho/Span.hpp>
Public Types | |
| using | const_pointer = const data_type * |
| Constant pointer type. | |
| using | data_type = T |
| Data type. | |
| using | pointer = data_type * |
| Pointer type. | |
| using | size_type = std::size_t |
| Size type. | |
Public Member Functions | |
| template<std::size_t SIZE> | |
| constexpr | Span (data_type(&array)[SIZE]) noexcept |
| Initializing constructor. | |
| constexpr | Span (pointer array, size_type size) noexcept |
| Initializing constructor. | |
| constexpr | Span (std::initializer_list< T > list) noexcept |
| Initializing constructor. | |
| template<typename U > | |
| constexpr | Span (U &&value) noexcept |
| Initializing constructor. | |
| constexpr pointer | begin () const noexcept |
| Gets the "begin" iterator value. | |
| constexpr pointer | data () const noexcept |
| Direct access to data. | |
| constexpr bool | empty () const noexcept |
| Checks whether this span is empty. | |
| constexpr pointer | end () const noexcept |
| Gets the "end" iterator value. | |
| constexpr data_type & | operator[] (size_type index) const noexcept |
| Accesses the indexed element. | |
| constexpr size_type | size () const noexcept |
| Gets the size of this span. | |
An encapsulation of an array and its size.
std::span class. std::span if/when this project shifts to C++20.