MySQL 8.0.39
Source Code Documentation
|
#include <span.h>
Public Types | |
using | element_type = T |
using | value_type = std::remove_cv_t< T > |
using | size_type = std::size_t |
using | difference_type = std::ptrdiff_t |
using | pointer = T * |
using | const_pointer = const T * |
using | reference = T & |
using | const_reference = const T & |
using | iterator = detail::iterator< span > |
using | reverse_iterator = std::reverse_iterator< iterator > |
Public Member Functions | |
template<bool B = (Extent == 0) || (Extent == dynamic_extent), typename std::enable_if< B, int >::type = 0> | |
constexpr | span () noexcept |
default construct. More... | |
constexpr | span (pointer ptr, size_type count) |
construct a span from pointer and size More... | |
template<class Range , std::enable_if_t< detail::is_compatible_range< Range, element_type >::value, int > = 0> | |
constexpr | span (Range &cont) noexcept |
construct a span from a continous range like a vector. More... | |
template<class Range , std::enable_if_t< std::is_const_v< element_type > &&detail::is_compatible_range< Range, element_type >::value, int > = 0> | |
constexpr | span (const Range &range) noexcept |
construct a span from a const continous range like a vector. More... | |
template<std::size_t N, std::enable_if_t< extent==dynamic_extent||extent==N, int > = 0> | |
constexpr | span (stdx::type_identity_t< element_type >(&arr)[N]) noexcept |
construct a span from C-array. More... | |
template<class U , std::size_t N, std::enable_if_t<(Extent==dynamic_extent||Extent==N) &&detail::is_array_convertible< U, T >::value, int > = 0> | |
constexpr | span (std::array< U, N > &arr) noexcept |
construct a span from a std::array. More... | |
template<class U , std::size_t N, std::enable_if_t<(Extent==dynamic_extent||Extent==N) &&detail::is_array_convertible< U, T >::value, int > = 0> | |
constexpr | span (const std::array< U, N > &arr) noexcept |
constexpr | span (const span &other) noexcept=default |
constexpr span & | operator= (const span &other) noexcept=default |
~span () noexcept=default | |
template<std::size_t Count> | |
constexpr span< element_type, Count > | first () const |
create a span of the first Count elements. More... | |
constexpr span< element_type, dynamic_extent > | first (size_type count) const |
create a span of the first Count elements. More... | |
template<std::size_t Count> | |
constexpr span< element_type, Count > | last () const |
create a span of the last Count elements. More... | |
constexpr span< element_type, dynamic_extent > | last (size_type count) const |
create a span of the last Count elements. More... | |
template<std::size_t Offset, std::size_t Count = dynamic_extent> | |
constexpr span< element_type, detail::extent_size< Extent, Offset, Count >::size > | subspan () const |
create a span of the Count elements, starting at offset. More... | |
constexpr span< element_type, dynamic_extent > | subspan (size_type offset, size_type count=dynamic_extent) const |
create a span of the Count elements, starting at offset. More... | |
constexpr reference | operator[] (size_type idx) const |
returns a ref to the idx-tn element in the sequence. More... | |
constexpr bool | empty () const noexcept |
check if this span is empty. More... | |
constexpr pointer | data () const noexcept |
get the pointer the first element. More... | |
constexpr size_type | size () const noexcept |
get size in elements. More... | |
constexpr size_type | size_bytes () const noexcept |
get size in bytes. More... | |
constexpr reference | front () const |
return a reference to the first element. More... | |
constexpr reference | back () const |
return a reference to the last element. More... | |
constexpr iterator | begin () const noexcept |
iterator to the first element. More... | |
constexpr iterator | end () const noexcept |
iterator past the last element. More... | |
constexpr reverse_iterator | rbegin () const noexcept |
constexpr reverse_iterator | rend () const noexcept |
Static Public Attributes | |
static constexpr const size_t | extent = Extent |
Private Attributes | |
pointer | data_ |
size_type | size_ |
using stdx::span< T, Extent >::const_pointer = const T * |
using stdx::span< T, Extent >::const_reference = const T & |
using stdx::span< T, Extent >::difference_type = std::ptrdiff_t |
using stdx::span< T, Extent >::element_type = T |
using stdx::span< T, Extent >::iterator = detail::iterator<span> |
using stdx::span< T, Extent >::pointer = T * |
using stdx::span< T, Extent >::reference = T & |
using stdx::span< T, Extent >::reverse_iterator = std::reverse_iterator<iterator> |
using stdx::span< T, Extent >::size_type = std::size_t |
using stdx::span< T, Extent >::value_type = std::remove_cv_t<T> |
|
inlineconstexprnoexcept |
default construct.
only enabled if Extent is 0 or dynamic.
|
inlineconstexpr |
construct a span from pointer and size
|
inlineconstexprnoexcept |
construct a span from a continous range like a vector.
|
inlineconstexprnoexcept |
construct a span from a const continous range like a vector.
|
inlineconstexprnoexcept |
construct a span from C-array.
|
inlineconstexprnoexcept |
construct a span from a std::array.
|
inlineconstexprnoexcept |
|
constexprdefaultnoexcept |
|
defaultnoexcept |
|
inlineconstexpr |
return a reference to the last element.
The behaviour is undefined if the span is empty.
|
inlineconstexprnoexcept |
iterator to the first element.
|
inlineconstexprnoexcept |
get the pointer the first element.
|
inlineconstexprnoexcept |
check if this span is empty.
true | if span is empty. |
false | if span is not empty. |
|
inlineconstexprnoexcept |
iterator past the last element.
|
inlineconstexpr |
create a span of the first Count elements.
The behaviour is undefined if Count > size()
|
inlineconstexpr |
create a span of the first Count elements.
The behaviour is undefined if count > size().
|
inlineconstexpr |
return a reference to the first element.
The behaviour is undefined if the span is empty.
|
inlineconstexpr |
create a span of the last Count elements.
The behaviour is undefined if Count > size().
|
inlineconstexpr |
create a span of the last Count elements.
The behaviour is undefined if count > size().
|
constexprdefaultnoexcept |
|
inlineconstexpr |
returns a ref to the idx-tn element in the sequence.
The behaviour is undefined if idx >= size()
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
get size in elements.
|
inlineconstexprnoexcept |
get size in bytes.
|
inlineconstexpr |
create a span of the Count elements, starting at offset.
if 'Count' is 'dynamic_extent', then up to the end of the span.
The behaviour is undefined if Offset or Count are out of range.
|
inlineconstexpr |
create a span of the Count elements, starting at offset.
if 'count' is 'dynamic_extent', then up to the end of the span.
The behaviour is undefined if Count > size()
, and if Offset > size()
.
|
private |
|
staticconstexpr |
|
private |