template < class charT, // basic_stringstream::char_type class traits = char_traits<charT>, // basic_stringstream::traits_type class Alloc = allocator<charT> // basic_stringstream::allocator_type > class basic_stringstream;
field | member functions | description | |
---|---|---|---|
Formatting | format flags | flags setf unsetf | A set of internal flags that affect how certain input/output operations are interpreted or generated. See member type fmtflags. |
field width | width | Width of the next formatted element to insert. | |
display precision | precision | Decimal precision for the next floating-point value inserted. | |
locale | getloc imbue | The locale object used by the function for formatted input/output operations affected by localization properties. | |
fill character | fill | Character to pad a formatted field up to the field width (width). | |
State | error state | rdstate setstate clear | The current error state of the stream. Individual values may be obtained by calling good, eof, fail and bad. See member type iostate. |
exception mask | exceptions | The state flags for which a failure exception is thrown. See member type iostate. | |
Other | callback stack | register_callback | Stack of pointers to functions that are called when certain events occur. |
extensible arrays | iword pword xalloc | Internal arrays to store objects of type long and void* . | |
tied stream | tie | Pointer to output stream that is flushed before each i/o operation on this stream. | |
stream buffer | rdbuf | Pointer to the associated basic_streambuf object, which is charge of all input/output operations. | |
character count | gcount | Count of characters read by last unformatted input operation. |
member type | definition | notes |
---|---|---|
char_type | The first template parameter (charT) | |
traits_type | The second template parameter (traits) | defaults to: char_traits<charT> |
allocator_type | The third template parameter (Alloc) | defaults to: allocator<charT> |
int_type | traits_type::int_type | |
pos_type | traits_type::pos_type | generally, the same as streampos |
off_type | traits_type::off_type | generally, the same as streamoff |