31 Input/output library [input.output]

31.9 Span-based streams [span.streams]

31.9.6 Class template basic_­spanstream [spanstream] Constructors [spanstream.ctor]

explicit basic_spanstream(std::span<charT> s, ios_base::openmode which = ios_base::out | ios_bas::in);
Effects: Initializes the base class with basic_­iostream<charT, traits>(addressof(sb)) and sb with basic_­spanbuf<charT, traits>(s, which) ([spanbuf.ctor]).
basic_spanstream(basic_spanstream&& rhs);
Effects: Initializes the base class with std​::​move(rhs) and sb with std​::​move(rhs.sb).
Next, basic_­iostream<charT, traits>​::​set_­rdbuf(addressof(sb)) is called to install the contained basic_­spanbuf.