31 Input/output library [input.output]

31.8 String-based streams [string.streams]

31.8.5 Class template basic_stringstream [stringstream]

31.8.5.2 Constructors [stringstream.cons]

explicit basic_stringstream(ios_base::openmode which);
Effects: Initializes the base class with basic_iostream<charT, traits>(addressof(sb)) ([iostream.cons]) and sb with basic_stringbuf<charT, traits, Allocator>(which).
explicit basic_stringstream( const basic_string<charT, traits, Allocator>& s, ios_base::openmode which = ios_base::out | ios_base::in);
Effects: Initializes the base class with basic_iostream<charT, traits>(addressof(sb)) ([iostream.cons]) and sb with basic_stringbuf<charT, traits, Allocator>(s, which).
basic_stringstream(ios_base::openmode which, const Allocator& a);
Effects: Initializes the base class with basic_iostream<charT, traits>(addressof(sb)) ([iostream.cons]) and sb with basic_stringbuf<charT, traits, Allocator>(which, a) ([stringbuf.cons]).
explicit basic_stringstream( basic_string<charT, traits, Allocator>&& s, ios_base::openmode which = ios_base::out | ios_base::in);
Effects: Initializes the base class with basic_iostream<charT, traits>(addressof(sb)) ([iostream.cons]) and sb with basic_stringbuf<charT, traits, Allocator>(std​::​move(s), which) ([stringbuf.cons]).
template<class SAlloc> basic_stringstream( const basic_string<charT, traits, SAlloc>& s, ios_base::openmode which, const Allocator& a);
Effects: Initializes the base class with basic_iostream<charT, traits>(addressof(sb)) ([iostream.cons]) and sb with basic_stringbuf<charT, traits, Allocator>(s, which, a) ([stringbuf.cons]).
template<class SAlloc> explicit basic_stringstream( const basic_string<charT, traits, SAlloc>& s, ios_base::openmode which = ios_base::out | ios_base::in);
Constraints: is_same_v<SAlloc,Allocator> is false.
Effects: Initializes the base class with basic_iostream<charT, traits>(addressof(sb)) ([iostream.cons]) and sb with basic_stringbuf<charT, traits, Allocator>(s, which) ([stringbuf.cons]).
template<class T> explicit basic_stringstream(const T& t, ios_base::openmode which = ios_base::out | ios_base::in); template<class T> basic_stringstream(const T& t, const Allocator& a); template<class T> basic_stringstream(const T& t, ios_base::openmode which, const Allocator& a);
Let which be ios_base​::​out | ios_base​::​in for the overload with no parameter which, and a be Allocator() for the overload with no parameter a.
Constraints: is_convertible_v<const T&, basic_string_view<charT, traits>> is true.
Effects: Initializes the base class with addressof(sb), and direct-non-list-initializes sb with t, which, a.
basic_stringstream(basic_stringstream&& rhs);
Effects: Move constructs from the rvalue rhs.
This is accomplished by move constructing the base class, and the contained basic_stringbuf.
Then calls basic_istream<charT, traits>​::​set_rdbuf(addressof(sb)) to install the contained basic_stringbuf.