Section
std::basic_spanbuf
std::basic_spanbuf is a std::basic_streambuf whose associated character sequence is a memory-resident sequence of arbitrary characters, which can be initialized from or made available as an instance of std::span
# Declarations
template<
class CharT,
class Traits = std::char_traits<CharT>
> class basic_spanbuf
: public std::basic_streambuf<CharT, Traits>
(since C++23)
# Notes
std::basic_spanbuf does not own the underlying buffer.
It is the responsibility of programmers to ensure the underlying buffer is in its lifetime when used by a std::basic_spanbuf object. Additional synchronization may be needed if more than one thread operates the same underlying buffer through different std::basic_spanbuf objects.