|
| template<std::size_t UExtent = Extent, typename = enable_if_t<detail::is_allowed_extent_conversion<0,UExtent>::value>> |
| constexpr | span () noexcept |
| | Default-constructs a span. More...
|
| |
| template<typename It , typename End , enable_if_t<(Extent==bpstd::dynamic_extent) &&bpstd::detail::is_iter_convertible< It, T >::value, int > = 0> |
| constexpr | span (It it, End end) noexcept |
| | Constructs a span from an iterator range. More...
|
| |
|
template<typename It , typename End , enable_if_t<(Extent !=bpstd::dynamic_extent) &&bpstd::detail::is_iter_convertible< It, T >::value, int > = 0> |
| constexpr | span (It it, End end) noexcept |
| |
| template<std::size_t N, typename = enable_if_t<detail::is_allowed_extent_conversion<N,Extent>::value>> |
| constexpr | span (element_type(&arr)[N]) noexcept |
| | Constructs a span from an array reference. More...
|
| |
| template<typename U , std::size_t N, typename = enable_if_t<detail::is_allowed_extent_conversion<N,Extent>::value>> |
| constexpr | span (const span< U, N > &s) noexcept |
| | Constructs a span from a different span. More...
|
| |
| constexpr | span (const span &other) noexcept=default |
| | Constructs a span by copying other. More...
|
| |
| BPSTD_CPP14_CONSTEXPR span & | operator= (const span &other) noexcept=default |
| | Assigns a span from other. More...
|
| |
| constexpr reference | front () const noexcept |
| | Gets a reference to the front element of this span. More...
|
| |
| constexpr reference | back () const noexcept |
| | Gets a reference to the back element of this span. More...
|
| |
| constexpr reference | operator[] (size_type idx) const noexcept |
| | Gets a reference to the element at idx. More...
|
| |
| constexpr pointer | data () const noexcept |
| | Gets a pointer to the start of the data. More...
|
| |
| constexpr size_type | size () const noexcept |
| | Gets the number of elements in this span. More...
|
| |
| constexpr size_type | size_bytes () const noexcept |
| | Gets the number of bytes in this span. More...
|
| |
| constexpr bool | empty () const noexcept |
| | Queries whether this span is empty. More...
|
| |
| template<std::size_t Count> |
| constexpr span< element_type, Count > | first () const |
| | Creates a subspan from the first Count elements. More...
|
| |
| constexpr span< element_type > | first (size_t count) const |
| | Creates a subspan from the first count elements. More...
|
| |
| template<std::size_t Count> |
| constexpr span< element_type, Count > | last () const |
| | Creates a subspan from the last Count elements. More...
|
| |
| constexpr span< element_type > | last (size_t count) const |
| | Creates a subspan from the last count elements. More...
|
| |
| template<std::size_t Offset, std::size_t Count = dynamic_extent> |
| constexpr span< element_type, detail::compute_subspan_size< Extent, Offset, Count >::value > | subspan () const |
| | Creates a subspan that is Count elements long, Offset from the start of this span. More...
|
| |
| constexpr span< element_type > | subspan (std::size_t offset, std::size_t count=dynamic_extent) const |
| | Creates a subspan that is count elements long, offset from the start of this span. More...
|
| |
|
constexpr iterator | begin () const noexcept |
| |
|
constexpr iterator | end () const noexcept |
| |
|
constexpr reverse_iterator | rbegin () const noexcept |
| |
|
constexpr reverse_iterator | rend () const noexcept |
| |
|
template<typename It , bpstd::enable_if_t<(Extent==bpstd::dynamic_extent) &&bpstd::detail::is_iter_convertible< It, T >::value, int > > |
| constexpr BPSTD_INLINE_VISIBILITY | span (It it, size_type count) noexcept |
| |
|
template<typename It , typename End , bpstd::enable_if_t<(Extent==bpstd::dynamic_extent) &&bpstd::detail::is_iter_convertible< It, T >::value, int > > |
| constexpr BPSTD_INLINE_VISIBILITY | span (It it, End end) noexcept |
| |
|
template<std::size_t N, typename > |
| constexpr BPSTD_INLINE_VISIBILITY | span (element_type(&arr)[N]) noexcept |
| |
|
template<typename U , std::size_t N, typename > |
| constexpr BPSTD_INLINE_VISIBILITY | span (std::array< U, N > &arr) noexcept |
| |
|
template<typename U , std::size_t N, typename > |
| constexpr BPSTD_INLINE_VISIBILITY | span (const std::array< U, N > &arr) noexcept |
| |
|
template<typename U , std::size_t N, typename > |
| constexpr BPSTD_INLINE_VISIBILITY | span (const span< U, N > &s) noexcept |
| |
|
template<std::size_t Count> |
| constexpr BPSTD_INLINE_VISIBILITY bpstd::span< typename bpstd::span< T, Extent >::element_type, Count > | first () const |
| |
|
template<std::size_t Count> |
| constexpr BPSTD_INLINE_VISIBILITY bpstd::span< typename bpstd::span< T, Extent >::element_type, Count > | last () const |
| |
|
template<std::size_t Offset, std::size_t Count> |
| constexpr BPSTD_INLINE_VISIBILITY bpstd::span< typename bpstd::span< T, Extent >::element_type, bpstd::detail::compute_subspan_size< Extent, Offset, Count >::value > | subspan () const |
| |
|
| template<typename It , enable_if_t<(Extent==bpstd::dynamic_extent) &&bpstd::detail::is_iter_convertible< It, T >::value, int > = 0> |
| constexpr | span (It it, size_type count) noexcept |
| | Constructs a span from an iterator it and the count. More...
|
| |
| template<typename It , enable_if_t<(Extent !=bpstd::dynamic_extent) &&bpstd::detail::is_iter_convertible< It, T >::value, int > = 0> |
| constexpr | span (It it, size_type count) noexcept |
| | Constructs a span from an iterator it and the count. More...
|
| |
|
| template<typename U , std::size_t N, typename = enable_if_t<detail::is_allowed_extent_conversion<N,Extent>::value>> |
| constexpr | span (std::array< U, N > &arr) noexcept |
| | Constructs a span from a reference to a std::array. More...
|
| |
| template<typename U , std::size_t N, typename = enable_if_t<detail::is_allowed_extent_conversion<N,Extent>::value>> |
| constexpr | span (const std::array< U, N > &arr) noexcept |
| | Constructs a span from a reference to a std::array. More...
|
| |
template<typename T, std::size_t Extent = dynamic_extent>
class bpstd::span< T, Extent >
This class is a non-owning view of a contiguous piece of memory.
This type describes an object that can refer to a contiguous sequence of objects with the first element of the sequence at position zero. A span can either have a static extent, in which case the number of elements in the sequence is known and encoded in the type, or a dynamic extent, in which case the size is known at runtime.
- Template Parameters
-
| T | the underlying type of the span |
| Extent | the extent (size) of the span |
Definition at line 182 of file span.hpp.