std::basic_spanbuf<CharT,Traits>::span - cppreference.com (original) (raw)
| std::span<CharT> span() const noexcept; | (1) | (since C++23) |
|---|---|---|
| void span( std::span<CharT> s ) noexcept; | (2) | (since C++23) |
- Gets a
spanreferencing the written area if std::ios_base::out is set in the open mode, or aspanreferencing the underlying buffer otherwise.
[edit] Parameters
| s | - | a std::span that references the user-provided buffer |
|---|
[edit] Return value
std::span<CharT>(pbase(), pptr()) if std::ios_base::out is set in the open mode, or a std::span<CharT> that references the whole underlying buffer otherwise.
(none)
[edit] Example
[edit] See also
| | replaces or obtains a copy of the associated character string (public member function of std::basic_stringbuf<CharT,Traits,Allocator>) [edit] | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | obtains a view over the underlying character sequence (public member function of std::basic_stringbuf<CharT,Traits,Allocator>) [edit] | | | marks the buffer frozen and returns the beginning pointer of the input sequence (public member function of std::strstreambuf) [edit] |