template<typename _CharT, typename _Traits, typename _Alloc>
class std::basic_ostringstream< _CharT, _Traits, _Alloc >
Controlling output for std::string.
- Template Parameters
-
_CharT | Type of character stream. |
_Traits | Traits for character type, defaults to char_traits<_CharT>. |
_Alloc | Allocator type, defaults to allocator<_CharT>. |
This class supports writing to objects of type std::basic_string, using the inherited functions from std::basic_ostream. To control the associated sequence, an instance of std::basic_stringbuf is used, which this page refers to as sb
.
Definition at line 104 of file iosfwd.
template<typename _CharT , typename _Traits , typename _Alloc >
Default constructor starts with an empty string buffer.
Initializes sb
using mode|out
, and passes &sb
to the base class initializer. Does not allocate any buffer.
That's a lie. We initialize the base class with NULL, because the string class does its own memory management.
Definition at line 583 of file sstream.
template<typename _CharT , typename _Traits , typename _Alloc >
Starts with an empty string buffer.
- Parameters
-
__mode | Whether the buffer can read, or write, or both. |
ios_base::out
is automatically included in mode.
Initializes sb
using mode|out
, and passes &sb
to the base class initializer. Does not allocate any buffer.
That's a lie. We initialize the base class with NULL, because the string class does its own memory management.
Definition at line 600 of file sstream.
template<typename _CharT , typename _Traits , typename _Alloc >
Starts with an existing string buffer.
- Parameters
-
__str | A string to copy as a starting buffer. |
__mode | Whether the buffer can read, or write, or both. |
ios_base::out
is automatically included in mode.
Initializes sb
using str and mode|out
, and passes &sb
to the base class initializer.
That's a lie. We initialize the base class with NULL, because the string class does its own memory management.
Definition at line 618 of file sstream.