template<typename ElementType, std::size_t Extent>
class gul14::span< ElementType, Extent >
A view to a contiguous sequence of objects.
This is a backport of std::span from C++20.
- Since
- GUL version 1.9
|
template<std::size_t E = Extent, typename std::enable_if<(E==dynamic_extent||E<=0), int >::type = 0> |
constexpr | span () noexcept |
| See std::span.
|
|
constexpr | span (pointer ptr, index_type count) |
| See std::span.
|
|
constexpr | span (pointer first_elem, pointer last_elem) |
| See std::span.
|
|
template<std::size_t N, std::size_t E = Extent, typename std::enable_if<(E==dynamic_extent||N==E) &&detail::is_container_element_type_compatible< element_type(&)[N], ElementType >::value, int >::type = 0> |
constexpr | span (element_type(&arr)[N]) noexcept |
| See std::span.
|
|
template<std::size_t N, std::size_t E = Extent, typename std::enable_if<(E==dynamic_extent||N==E) &&detail::is_container_element_type_compatible< std::array< value_type, N > &, ElementType >::value, int >::type = 0> |
| span (std::array< value_type, N > &arr) noexcept |
| See std::span.
|
|
template<std::size_t N, std::size_t E = Extent, typename std::enable_if<(E==dynamic_extent||N==E) &&detail::is_container_element_type_compatible< const std::array< value_type, N > &, ElementType >::value, int >::type = 0> |
| span (const std::array< value_type, N > &arr) noexcept |
| See std::span.
|
|
template<typename Container , std::size_t E = Extent, typename std::enable_if< E==dynamic_extent &&detail::is_container< Container >::value &&detail::is_container_element_type_compatible< Container &, ElementType >::value, int >::type = 0> |
constexpr | span (Container &cont) |
| See std::span.
|
|
template<typename Container , std::size_t E = Extent, typename std::enable_if< E==dynamic_extent &&detail::is_container< Container >::value &&detail::is_container_element_type_compatible< const Container &, ElementType >::value, int >::type = 0> |
constexpr | span (const Container &cont) |
| See std::span.
|
|
constexpr | span (const span &other) noexcept=default |
| See std::span.
|
|
template<typename OtherElementType , std::size_t OtherExtent, typename std::enable_if<(Extent==OtherExtent||Extent==dynamic_extent) &&std::is_convertible< OtherElementType(*)[], ElementType(*)[]>::value, int >::type = 0> |
constexpr | span (const span< OtherElementType, OtherExtent > &other) noexcept |
| See std::span.
|
|
| ~span () noexcept=default |
| See std::span.
|
|
GUL_SPAN_CONSTEXPR_ASSIGN span & | operator= (const span &other) noexcept=default |
| See std::span.
|
|
template<std::size_t Count> |
constexpr span< element_type, Count > | first () const |
| See std::span.
|
|
template<std::size_t Count> |
constexpr span< element_type, Count > | last () const |
| See std::span.
|
|
template<std::size_t Offset, std::size_t Count = dynamic_extent> |
constexpr subspan_return_t< Offset, Count > | subspan () const |
| See std::span.
|
|
constexpr span< element_type, dynamic_extent > | first (index_type count) const |
| See std::span.
|
|
constexpr span< element_type, dynamic_extent > | last (index_type count) const |
| See std::span.
|
|
constexpr span< element_type, dynamic_extent > | subspan (index_type offset, index_type count=dynamic_extent) const |
| See std::span.
|
|
constexpr index_type | size () const noexcept |
| See std::span.
|
|
constexpr index_type | size_bytes () const noexcept |
| See std::span.
|
|
constexpr bool | empty () const noexcept |
| See std::span.
|
|
constexpr reference | operator[] (index_type idx) const |
| See std::span.
|
|
constexpr reference | front () const |
| See std::span.
|
|
constexpr reference | back () const |
| See std::span.
|
|
constexpr pointer | data () const noexcept |
| See std::span.
|
|
constexpr iterator | begin () const noexcept |
| See std::span.
|
|
constexpr iterator | end () const noexcept |
| See std::span.
|
|
constexpr const_iterator | cbegin () const noexcept |
| See std::span.
|
|
constexpr const_iterator | cend () const noexcept |
| See std::span.
|
|
reverse_iterator | rbegin () const noexcept |
| See std::span.
|
|
reverse_iterator | rend () const noexcept |
| See std::span.
|
|
const_reverse_iterator | crbegin () const noexcept |
| See std::span.
|
|
const_reverse_iterator | crend () const noexcept |
| See std::span.
|
|