basic_stringstream

template <class E,
    class T = char_traits<E>,
    class A = allocator<E> >
    class basic_stringstream : public basic_iostream<E, T> {
public:
    explicit basic_stringstream(ios_base::openmode mode = ios_base::in | ios_base::out);
    explicit basic_stringstream(const basic_string<E, T, A>& x,
        ios_base::openmode mode = ios_base::in | ios_base::out);
    basic_stringbuf<E, T, A> *rdbuf() const;
    basic_string<E, T, A>& str();
    void str(const basic_string<E, T, A>& x);
    };

The template class describes an object that controls insertion and extraction of elements and encoded objects using a stream buffer of class basic_stringbuf<E, T, A>, with elements of type E, whose character traits are determined by the class T, and whose elements are allocated by an allocator of class A. The object stores an object of class basic_stringbuf<E, T, A>.