[spanbuf.members] (original) (raw)

31 Input/output library [input.output]

31.9 Span-based streams [span.streams]

31.9.3 Class template basic_spanbuf [spanbuf]

31.9.3.4 Member functions [spanbuf.members]

std::span<charT> span() const noexcept;

Returns: If ios_base​::​out is set in mode, returns std​::​span<charT>(pbase(), pptr()), otherwise returns buf.

[Note 1:

In contrast to basic_stringbuf, the underlying sequence never grows and is not owned.

An owning copy can be obtained by converting the result to basic_string<charT>.

— _end note_]

void span(std::span<charT> s) noexcept;

Effects: buf = s.

Initializes the input and output sequences according to mode.

Postconditions: