29 Input/output library [input.output]

29.9 Span-based streams [span.streams]

29.9.3 Class template spanbuf [spanbuf] Constructors [spanbuf.ctor]

explicit basic_spanbuf(std::span<charT> s, ios_base::openmode which = ios_base::in | ios_base::out);
Effects: Initializes the base class with basic_­streambuf() ([streambuf.cons]), and mode with which.
Initializes the internal pointers as if calling span(s).
basic_spanbuf(basic_spanbuf&& rhs);
Effects: Initializes the base class with std​::​move(rhs) and mode with std​::​move(rhs.mode) and buf with std​::​move(rhs.buf).
The sequence pointers in *this (eback(), gptr(), egptr(), pbase(), pptr(), epptr()) obtain the values which rhs had.
It is implementation-defined whether rhs.buf.​empty() returns true after the move.
Postconditions: Let rhs_­p refer to the state of rhs just prior to this construction.
  • span().data() == rhs_­p.span().data()
  • span().size() == rhs_­p.span().size()
  • eback() == rhs_­p.eback()
  • gptr() == rhs_­p.gptr()
  • egptr() == rhs_­p.egptr()
  • pbase() == rhs_­p.pbase()
  • pptr() == rhs_­p.pptr()
  • epptr() == rhs_­p.epptr()
  • getloc() == rhs_­p.getloc()