|
| constexpr | Span () |
| | Default constructor. More...
|
| |
| constexpr | Span (std::nullptr_t) |
| | Null constructor. More...
|
| |
| constexpr | Span (T *data, std::size_t size) |
| | Constructor from a pointer and a size. More...
|
| |
| template<typename U , typename = std::enable_if_t<std::is_convertible<U(*)[], T(*)[]>::value>> |
| | Span (std::vector< U > &values) |
| | Constructor from a std::vector More...
|
| |
| template<typename U , typename = std::enable_if_t<std::is_convertible<U(*)[], T(*)[]>::value && std::is_const<T>::value>> |
| | Span (const std::vector< U > &values) |
| | Constructor from a std::vector More...
|
| |
| template<typename U , std::size_t N, typename = std::enable_if_t<std::is_convertible<U(*)[], T(*)[]>::value>> |
| | Span (std::array< U, N > &values) |
| | Constructor from a std::array More...
|
| |
| template<typename U , std::size_t N, typename = std::enable_if_t<std::is_convertible<U(*)[], T(*)[]>::value>> |
| constexpr | Span (U(&data)[N]) |
| | Constructor from a static array. More...
|
| |
| template<typename U , typename = std::enable_if_t<std::is_convertible<U(*)[], T(*)[]>::value>> |
| constexpr | Span (Span< U > other) |
| | Constructor from another span. More...
|
| |
| template<typename U , std::size_t N, typename = std::enable_if_t<std::is_convertible<U(*)[], T(*)[]>::value>> |
| constexpr | Span (StaticSpan< U, N > other) |
| | Constructor from another static span. More...
|
| |
| constexpr T * | getData () noexcept |
| | Get a pointer to the elements. More...
|
| |
| constexpr const T * | getData () const noexcept |
| | Get a pointer to the elements. More...
|
| |
| constexpr std::size_t | getSize () const noexcept |
| | Get the number of elements. More...
|
| |
| constexpr bool | isEmpty () const noexcept |
| | Check if the array is empty. More...
|
| |
| constexpr T * | begin () noexcept |
| | Get an iterator to the first element. More...
|
| |
| constexpr T * | end () noexcept |
| | Get an iterator past the last element. More...
|
| |
| constexpr const T * | begin () const noexcept |
| | Get an iterator to the first element. More...
|
| |
| constexpr const T * | end () const noexcept |
| | Get an iterator past the last element. More...
|
| |
| constexpr T & | operator[] (std::size_t index) |
| | Get an element at a given index. More...
|
| |
| constexpr const T & | operator[] (std::size_t index) const |
| | Get an element at a given index. More...
|
| |
| constexpr Span< T > | slice (std::size_t b, std::size_t e) const noexcept |
| | Take a sub-span. More...
|
| |
| template<std::size_t B, std::size_t E> |
| constexpr StaticSpan< T, E - B > | slice () const noexcept |
| | Take a constant sub-span. More...
|
| |
| constexpr Span< T > | first (std::size_t count) const noexcept |
| | Take a span on the first objects. More...
|
| |
| template<std::size_t C> |
| constexpr StaticSpan< T, C > | first () const noexcept |
| | Take a constant span on the first objects. More...
|
| |
| constexpr Span< T > | last (std::size_t count) const noexcept |
| | Take a span on the last objects. More...
|
| |
| template<std::size_t C> |
| constexpr StaticSpan< T, C > | last () const noexcept |
| | Take a constant span on the last objects. More...
|
| |
| constexpr Span< T > | firstExcept (std::size_t count) const noexcept |
| | Take a span on the first objects. More...
|
| |
| template<std::size_t C> |
| constexpr Span< T > | firstExcept () const noexcept |
| | Take a span on the first objects. More...
|
| |
| constexpr Span< T > | lastExcept (std::size_t count) const noexcept |
| | Take a span on the last objects. More...
|
| |
| template<std::size_t C> |
| constexpr Span< T > | lastExcept () const noexcept |
| | Take a span on the last objects. More...
|
| |
template<typename T>
class gf::Span< T >
A span.
A span is a non-owning reference to a contiguous sequence of objects.
This class stores a pointer to some data and its size. It can be built from various inputs: std::vector, static array, pointer and size.
- See also
- gf::StaticSpan