29 Input/output library [input.output]

29.8 String-based streams [string.streams]

29.8.4 Class template basic_­ostringstream [ostringstream]

29.8.4.2 Constructors [ostringstream.cons]

explicit basic_ostringstream(ios_base::openmode which);
Effects: Initializes the base class with basic_­ostream<charT, traits>(addressof(sb)) ([ostream]) and sb with basic_­stringbuf<charT, traits, Allocator>(which | ios_­base​::​out) ([stringbuf.cons]).
explicit basic_ostringstream( const basic_string<charT, traits, Allocator>& s, ios_base::openmode which = ios_base::out);
Effects: Initializes the base class with basic_­ostream<charT, traits>(addressof(sb)) ([ostream]) and sb with basic_­stringbuf<charT, traits, Allocator>(s, which | ios_­base​::​out)
([stringbuf.cons]).
basic_ostringstream(ios_base::openmode which, const Allocator& a);
Effects: Initializes the base class with basic_­ostream<charT, traits>(addressof(sb)) ([ostream]) and sb with basic_­stringbuf<charT, traits, Allocator>(which | ios_­base​::​out, a)
([stringbuf.cons]).
explicit basic_ostringstream( basic_string<charT, traits, Allocator>&& s, ios_base::openmode which = ios_base::out);
Effects: Initializes the base class with basic_­ostream<charT, traits>(addressof(sb)) ([ostream]) and sb with basic_­stringbuf<charT, traits, Allocator>(std​::​move(s), which | ios_­base​::​​out) ([stringbuf.cons]).
template<class SAlloc> basic_ostringstream( const basic_string<charT, traits, SAlloc>& s, ios_base::openmode which, const Allocator& a);
Effects: Initializes the base class with basic_­ostream<charT, traits>(addressof(sb)) ([ostream]) and sb with basic_­stringbuf<charT, traits, Allocator>(s, which | ios_­base​::​out, a)
([stringbuf.cons]).
template<class SAlloc> explicit basic_ostringstream( const basic_string<charT, traits, SAlloc>& s, ios_base::openmode which = ios_base::out);
Constraints: is_­same_­v<SAlloc,Allocator> is false.
Effects: Initializes the base class with basic_­ostream<charT, traits>(addressof(sb)) ([ostream]) and sb with basic_­stringbuf<charT, traits, Allocator>(s, which | ios_­base​::​out)
([stringbuf.cons]).
basic_ostringstream(basic_ostringstream&& 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_­ostream<charT, traits>​::​set_­rdbuf(addressof(sb)) to install the contained basic_­stringbuf.