GEOS
|
Lightweight non-owning wrapper over a contiguous range of elements. More...
#include <Span.hpp>
Public Types | |
using | element_type = T |
Type of range element. | |
using | value_type = std::remove_cv_t< T > |
Type of underlying value. | |
using | size_type = std::size_t |
Type used for indexing the range. | |
using | difference_type = std::ptrdiff_t |
Type used for indexing the range. | |
Public Member Functions | |
constexpr | Span () noexcept=default |
Construct an empty span. | |
Span (T *const ptr, size_type const size) noexcept | |
Construct a span from pointer and size. More... | |
template<typename ITER > | |
constexpr | Span (ITER const begin, ITER const end) noexcept |
Construct a span from pair of iterators. More... | |
template<int N> | |
constexpr | Span (T(&arr)[N]) noexcept |
Construct a span from a c-array. More... | |
template<typename R , typename std::enable_if_t< traits::is_range_like< R > > * = nullptr> | |
constexpr | Span (R const &range) |
Construct a span from a range-like object (anything that has begin() and end()). More... | |
constexpr size_type | size () const noexcept |
constexpr size_type | size_bytes () const noexcept |
constexpr bool | empty () const noexcept |
constexpr T * | data () const noexcept |
constexpr T * | begin () const noexcept |
constexpr T * | end () const noexcept |
constexpr std::reverse_iterator< T * > | rbegin () const noexcept |
constexpr std::reverse_iterator< T * > | rend () const noexcept |
T & | front () const |
T & | back () const |
T & | operator[] (size_type const i) const |
Span< element_type > | first (size_type const count) const |
Span< element_type > | last (size_type const count) const |
Span< element_type > | subspan (size_type const offset, size_type const count) const |
Lightweight non-owning wrapper over a contiguous range of elements.
T | type of range element |
This is a simplified version of C++17's std::span<> that doesn't support compile-time extents.
|
inlinenoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexpr |
|
inline |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inline |