Standard C++ Library Reference ISO/IEC (VERSION3)
typedef Alloc allocator_type;
explicit basic_stringstream(
ios_base::openmode mode =
ios_base::in | ios_base::out);
explicit basic_stringstream(
const basic_string<Elem, Tr, Alloc>& str,
ios_base::openmode mode =
ios_base::in | ios_base::out);
basic_stringbuf<Elem, Tr, Alloc> *rdbuf() const;
basic_string<Elem, Tr, Alloc> str();
void str(const basic_string<Elem, Tr, Alloc>& newstr);
};
The template class describes an object that controls insertion and extraction of elements and
encoded objects using a stream buffer of class basic_stringbuf<Elem, Tr, Alloc>,
with elements of type Elem, whose character traits are determined by the class Tr, and whose
elements are allocated by an allocator of class Alloc. The object stores an object of class
basic_stringbuf<Elem, Tr, Alloc>.
basic_stringstream::allocator_type
typedef Alloc allocator_type;
The type is a synonym for the template parameter Alloc.
basic_stringstream::basic_stringstream
explicit basic_stringstream(
ios_base::openmode mode =
ios_base::in | ios_base::out);
explicit basic_stringstream(
const basic_string<Elem, Tr, Alloc>& str,
ios_base::openmode mode =
ios_base::in | ios_base::out);
The first constructor initializes the base class by calling basic_iostream(sb), where sb
is the stored object of class basic_stringbuf<Elem, Tr, Alloc>. It also initializes
sb by calling basic_stringbuf<Elem, Tr, Alloc>(mode).
The second constructor initializes the base class by calling basic_iostream(sb). It also
initializes sb by calling basic_stringbuf<Elem, Tr, Alloc>(str, mode).