basic_ostringstream::basic_ostringstream

explicit basic_ostringstream(ios_base::openmode mode = ios_base::out);
explicit basic_ostringstream(const basic_string<E, T, A>& x,
    ios_base::openmode mode = ios_base::out);

The first constructor initializes the base class by calling basic_ostream(sb), where sb is the stored object of class basic_stringbuf<E, T, A>. It also initializes sb by calling basic_stringbuf<E, T, A>(mode | ios_base::out).

The second constructor initializes the base class by calling basic_ostream(sb). It also initializes sb by calling basic_stringbuf<E, T, A>(x, mode | ios_base::out).