|
constexpr | basic_string_span () noexcept=default |
| Default constructor. More...
|
|
template<std::size_t N> |
constexpr | basic_string_span (C(&array)[N]) noexcept |
| Construction from C string literal.
|
|
template<std::size_t N> |
constexpr | basic_string_span (C(&array)[N], span_size_t n) noexcept |
| Construction from C-array and explicit length value.
|
|
constexpr | basic_string_span (const string_type &str) noexcept |
| Construction from related standard string type.
|
|
template<typename Str , typename = std::enable_if_t< memory::has_span_data_member_v<Str, C> && memory::has_span_size_member_v<Str>>> |
constexpr | basic_string_span (Str &str) noexcept |
| Construction from compatible container reference. More...
|
|
template<typename Str , typename = std::enable_if_t< memory::has_span_data_member_v<Str, C> && memory::has_span_size_member_v<Str>>> |
constexpr | basic_string_span (const Str &str) noexcept |
| Construction from compatible container const reference. More...
|
|
constexpr auto | std_view () const noexcept -> std_view_type |
| Named conversion to the corresponding standard string view.
|
|
constexpr | operator std_view_type () const noexcept |
| Implicit conversion to the corresponding standard string view.
|
|
constexpr auto | to_string () const -> string_type |
| Conversion to the corresponding standard string.
|
|
constexpr auto | data () const noexcept -> pointer |
| Returns a pointer to the start of the span. More...
|
|
constexpr auto | empty () const noexcept -> bool |
| Indicates that the span is empty. More...
|
|
constexpr auto | size () const noexcept -> size_type |
| Returns the number of elements in the span. More...
|
|
constexpr | basic_span (pointer addr, size_type len) noexcept |
| Construction from pointer and length.
|
|
constexpr | basic_span (address_type addr, size_type len) noexcept |
| Construction from memory address and length.
|
|
constexpr | basic_span (pointer b, pointer e) noexcept |
| Construction from a pair of pointers.
|
|
constexpr | basic_span (address_type ba, address_type be) noexcept |
| Construction from a pair of memory addresses.
|
|
constexpr | basic_span () noexcept=default |
| Default constructor. Constructs an empty span. More...
|
|
constexpr | basic_span (const basic_span &) noexcept=default |
| Copy constructor.
|
|
constexpr | basic_span (basic_span &&) noexcept=default |
| Move constructor.
|
|
constexpr | basic_span (basic_span< T, P, S > that) noexcept |
| Converting copy constructor from span of compatible elements.
|
|
auto | operator= (const basic_span &) noexcept -> basic_span &=default |
| Copy assignment operator.
|
|
auto | operator= (basic_span &&) noexcept -> basic_span &=default |
| Move assignment operator.
|
|
auto | operator= (basic_span< T, P, S > that) noexcept -> auto & |
| Converting copy assignment from span of compatible elements.
|
|
auto | reset () noexcept -> auto & |
| Resets this span. More...
|
|
auto | reset (pointer addr, size_type length) noexcept -> auto & |
| Resets this span with a new pointer and length.
|
|
auto | reset (address_type addr, size_type length) noexcept -> auto & |
| Resets this span with a new memory address and length.
|
|
auto | reset (pointer b, pointer e) noexcept -> auto & |
| Resets this span with a pair or pointers.
|
|
constexpr | operator bool () const noexcept |
| Indicates that the span is not empty. More...
|
|
constexpr auto | is_empty () const noexcept -> bool |
| Indicates that the span is empty. More...
|
|
constexpr auto | empty () const noexcept -> bool |
| Indicates that the span is empty. More...
|
|
constexpr auto | is_zero_terminated () const noexcept -> bool |
| Indicates that the span is terminated with value T(0) if applicable.
|
|
constexpr auto | size () const noexcept -> size_type |
| Returns the number of elements in the span. More...
|
|
constexpr auto | data () const noexcept -> pointer |
| Returns a pointer to the start of the span. More...
|
|
constexpr auto | begin () const noexcept -> iterator |
| Returns an interator to the start of the span.
|
|
constexpr auto | end () const noexcept -> iterator |
| Returns a iterator past the end of the span.
|
|
constexpr auto | rbegin () const noexcept |
| Returns a reverse interator to the end of the span.
|
|
constexpr auto | rend () const noexcept |
| Returns a reverse interator past the begin of the span.
|
|
constexpr auto | addr () const noexcept -> address_type |
| Returns the memory address of the start of the span.
|
|
constexpr auto | begin_addr () const noexcept -> address_type |
| Returns the memory address of the start of the span.
|
|
constexpr auto | end_addr () const noexcept -> address_type |
| Returns the memory address past the end of the span.
|
|
auto | is_aligned_as () const noexcept -> bool |
| Checks if the start of the span is aligned as the alignment of X.
|
|
auto | encloses (const_address a) const noexcept -> bool |
| Indicates if this span encloses the specified address. More...
|
|
auto | contains (basic_span< Ts, Ps, Ss > that) const noexcept -> bool |
| Indicates if this span encloses another span. More...
|
|
auto | overlaps (const basic_span< Ts, Ps, Ss > &that) const noexcept -> bool |
| Indicates if this span overlaps with another span. More...
|
|
constexpr auto | ref (size_type index) const noexcept -> std::add_const_t< value_type > & |
| Returns a const reference to value at the specified index. More...
|
|
auto | ref (size_type index) noexcept -> value_type & |
| Returns a reference to value at the specified index. More...
|
|
auto | front () const noexcept -> const value_type & |
| Returns a const reference to value at the front of the span. More...
|
|
auto | front () noexcept -> value_type & |
| Returns a reference to value at the front of the span. More...
|
|
auto | back () const noexcept -> const value_type & |
| Returns a const reference to value at the back of the span. More...
|
|
auto | back () noexcept -> value_type & |
| Returns a const reference to value at the back of the span. More...
|
|
constexpr auto | element (Int index) const noexcept -> std::enable_if_t< std::is_integral_v< Int >, std::add_const_t< value_type > & > |
| Returns a const reference to value at the specified index. More...
|
|
auto | element (Int index) noexcept -> std::enable_if_t< std::is_integral_v< Int >, value_type & > |
| Returns a reference to value at the specified index. More...
|
|
auto | operator[] (Int index) noexcept -> std::enable_if_t< std::is_integral_v< Int >, value_type & > |
| Array subscript operator. More...
|
|
constexpr auto | operator[] (Int index) const noexcept -> std::enable_if_t< std::is_integral_v< Int >, std::add_const_t< value_type > & > |
| Array subscript operator. More...
|
|
|
static auto | list_to_stream (Output &out, memory::basic_span< T, P, S > s) -> Output & |
| Helper function for pretty-printing spans as lists into output streams. More...
|
|
static auto | read_from_stream (Input &in, memory::basic_span< T, P, S > s) -> auto & |
| Helper function for raw-reading spans from output streams. More...
|
|
static auto | write_to_stream (Output &out, memory::basic_span< T, P, S > s) -> auto & |
| Helper function for raw-reading spans into output streams. More...
|
|
static auto | operator<< (std::ostream &out, memory::basic_span< T, P, S > s) -> std::enable_if_t<!std::is_same_v< std::remove_const_t< T >, char >, std::ostream & > |
| Operator for printing generic element spans into output streams. More...
|
|
static auto | operator<< (std::ostream &out, memory::basic_span< T, P, S > s) -> std::enable_if_t< std::is_same_v< std::remove_const_t< T >, char >, std::ostream & > |
| Operator for printing spans of string characters into output streams. More...
|
|
static auto | make_span_getter (span_size_t &i, memory::basic_span< T, P, S > spn) |
| Makes a callable that returns consecutive span elements starting at i. More...
|
|
static auto | make_span_getter (span_size_t &i, memory::basic_span< T, P, S > spn, Transform transform) |
| Makes a callable getting consecutive, transformed span elements starting at i. More...
|
|
static auto | make_span_putter (span_size_t &i, memory::basic_span< T, P, S > spn) |
| Makes a callable setting consecutive elements of a span starting at i. More...
|
|
static auto | make_span_putter (span_size_t &i, memory::basic_span< T, P, S > spn, Transform transform) |
| Makes a callable setting consecutive elements of a span starting at i. More...
|
|
template<typename C, typename P = C*, typename S = span_size_t>
class eagine::basic_string_span< C, P, S >
Specialization of memory::basic_span for character string containers.