---
name: "std::basic_stringstream"
section: "3"
platform: "linux"
package: "gcc"
version: "16.2.1+r23+gd564253eb6c8-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/std::basic_stringstream"
---

# std::basic\_stringstream(3)

Controlling input and output for std::string.

## NAME

std::basic\_stringstream\< \_CharT, \_Traits, \_Alloc \> - Controlling input and output for std::string.

## SYNOPSIS

\#include \<sstream\>

Inherits **std::basic\_iostream\< \_CharT, \_Traits \>**.

### Public Types

typedef **ctype**\< \_CharT \> **\_\_ctype\_type**\
 typedef **ctype**\< \_CharT \> **\_\_ctype\_type**\
 typedef **basic\_ios**\< \_CharT, \_Traits \> **\_\_ios\_type**\
 typedef **basic\_ios**\< \_CharT, \_Traits \> **\_\_ios\_type**\
 typedef **basic\_iostream**\< char\_type, traits\_type \> **\_\_iostream\_type**\
 typedef **basic\_istream**\< \_CharT, \_Traits \> **\_\_istream\_type**\
 typedef **num\_get**\< \_CharT, **istreambuf\_iterator**\< \_CharT, \_Traits \> \> **\_\_num\_get\_type**\
 typedef **num\_put**\< \_CharT, **ostreambuf\_iterator**\< \_CharT, \_Traits \> \> **\_\_num\_put\_type**\
 typedef **basic\_ostream**\< \_CharT, \_Traits \> **\_\_ostream\_type**\
 typedef **basic\_streambuf**\< \_CharT, \_Traits \> **\_\_streambuf\_type**\
 typedef **basic\_streambuf**\< \_CharT, \_Traits \> **\_\_streambuf\_type**\
 typedef **basic\_string**\< \_CharT, \_Traits, \_Alloc \> **\_\_string\_type**\
 typedef **basic\_stringbuf**\< \_CharT, \_Traits, \_Alloc \> **\_\_stringbuf\_type**\
 typedef \_Alloc **allocator\_type**\
 typedef \_CharT **char\_type**\
 enum **event** { **erase\_event**, **imbue\_event**, **copyfmt\_event** }\
 The set of events that may be passed to an event callback.  typedef void(\* **event\_callback**) (**event** \_\_e, **ios\_base** &\_\_b, int \_\_i)\
 The type of an event callback function.  typedef \_Ios\_Fmtflags **fmtflags**\
 This is a bitmask type.  typedef traits\_type::int\_type **int\_type**\
 typedef \_Ios\_Iostate **iostate**\
 This is a bitmask type.  typedef traits\_type::off\_type **off\_type**\
 typedef \_Ios\_Openmode **openmode**\
 This is a bitmask type.  typedef traits\_type::pos\_type **pos\_type**\
 typedef \_Ios\_Seekdir **seekdir**\
 This is an enumerated type.  typedef \_Traits **traits\_type**\

### Public Member Functions

**basic\_stringstream** ()\
 Default constructor starts with an empty string buffer.  **basic\_stringstream** (\_\_string\_type &&\_\_str, **ios\_base::openmode** \_\_mode=**ios\_base::in**\|**ios\_base::out**)\
 **basic\_stringstream** (basic\_stringstream &&\_\_rhs)\
 **basic\_stringstream** (const \_\_string\_type &\_\_str, **ios\_base::openmode** \_\_m=**ios\_base::out**\|**ios\_base::in**)\
 Starts with an existing string buffer.  template\<typename \_SAlloc\> **basic\_stringstream** (const **basic\_string**\< \_CharT, \_Traits, \_SAlloc \> &\_\_str, const allocator\_type &\_\_a)\
 template\<typename \_SAlloc\> **basic\_stringstream** (const **basic\_string**\< \_CharT, \_Traits, \_SAlloc \> &\_\_str, **ios\_base::openmode** \_\_mode, const allocator\_type &\_\_a)\
 template\<typename \_SAlloc\> **basic\_stringstream** (const **basic\_string**\< \_CharT, \_Traits, \_SAlloc \> &\_\_str, **ios\_base::openmode** \_\_mode=**ios\_base::in**\|**ios\_base::out**)\
 **basic\_stringstream** (const basic\_stringstream &)=delete\
 **basic\_stringstream** (**ios\_base::openmode** \_\_m)\
 Starts with an empty string buffer.  **basic\_stringstream** (**ios\_base::openmode** \_\_mode, const allocator\_type &\_\_a)\
 **~basic\_stringstream** ()\
 The destructor does nothing.  template\<typename \_ValueT\> **basic\_istream**\< \_CharT, \_Traits \> & **\_M\_extract** (\_ValueT &\_\_v)\
 const **locale** & **\_M\_getloc** () const\
 Locale access.  template\<typename \_ValueT\> **basic\_ostream**\< \_CharT, \_Traits \> & **\_M\_insert** (\_ValueT \_\_v)\
 void **\_M\_setstate** (**iostate** \_\_state)\
 bool **bad** () const\
 Fast error checking.  void **clear** (**iostate** \_\_state=**goodbit**)\
 \[Re\]sets the error state.  **basic\_ios** & **copyfmt** (const **basic\_ios** &\_\_rhs)\
 Copies fields of \_\_rhs into this.  bool **eof** () const\
 Fast error checking.  **iostate** **exceptions** () const\
 Throwing exceptions on errors.  void **exceptions** (**iostate** \_\_except)\
 Throwing exceptions on errors.  bool **fail** () const\
 Fast error checking.  char\_type **fill** () const\
 Retrieves the *empty* character.  char\_type **fill** (char\_type \_\_ch)\
 Sets a new *empty* character.  **fmtflags** **flags** () const\
 Access to format flags.  **fmtflags** **flags** (**fmtflags** \_\_fmtfl)\
 Setting new format flags all at once.  \_\_ostream\_type & **flush** ()\
 Synchronizing the stream buffer.  **streamsize** **gcount** () const\
 Character counting.  **basic\_istream**\< wchar\_t \> & **getline** (char\_type \*\_\_s, **streamsize** \_\_n, char\_type \_\_delim)\
 **basic\_istream**\< char \> & **getline** (char\_type \*\_\_s, **streamsize** \_\_n, char\_type \_\_delim)\
 Explicit specialization declarations, defined in src/istream.cc.  **locale** **getloc** () const\
 Locale access.  bool **good** () const\
 Fast error checking.  **basic\_istream**\< wchar\_t \> & **ignore** (**streamsize** \_\_n)\
 **basic\_istream**\< char \> & **ignore** (**streamsize** \_\_n)\
 **basic\_istream**\< wchar\_t \> & **ignore** (**streamsize** \_\_n, int\_type \_\_delim)\
 **basic\_istream**\< char \> & **ignore** (**streamsize** \_\_n, int\_type \_\_delim)\
 **locale** **imbue** (const **locale** &\_\_loc)\
 Moves to a new locale.  long & **iword** (int \_\_ix)\
 Access to integer array.  char **narrow** (char\_type \_\_c, char \_\_dfault) const\
 Squeezes characters.  \_\_ostream\_type & **operator\<\<** (\_\_streambuf\_type \*\_\_sb)\
 Extracting from another streambuf.  \_\_ostream\_type & **operator\<\<** (const void \*\_\_p)\
 Pointer arithmetic inserters.  \_\_ostream\_type & **operator\<\<** (const volatile void \*\_\_p)\
 \_\_ostream\_type & **operator\<\<** (nullptr\_t)\
 **basic\_stringstream** & **operator=** (**basic\_stringstream** &&\_\_rhs)\
 **basic\_stringstream** & **operator=** (const **basic\_stringstream** &)=delete\
 \_\_istream\_type & **operator\>\>** (\_\_streambuf\_type \*\_\_sb)\
 Extracting into another streambuf.  \_\_istream\_type & **operator\>\>** (void \*&\_\_p)\
 Basic arithmetic extractors.  **streamsize** **precision** () const\
 Flags access.  **streamsize** **precision** (**streamsize** \_\_prec)\
 Changing flags.  void \*& **pword** (int \_\_ix)\
 Access to void pointer array.  **basic\_streambuf**\< \_CharT, \_Traits \> \* **rdbuf** (**basic\_streambuf**\< \_CharT, \_Traits \> \*\_\_sb)\
 Changing the underlying buffer.  \_\_stringbuf\_type \* **rdbuf** () const\
 Accessing the underlying buffer.  **iostate** **rdstate** () const\
 Returns the error state of the stream buffer.  void **register\_callback** (**event\_callback** \_\_fn, int \_\_index)\
 Add the callback \_\_fn with parameter \_\_index.  \_\_ostream\_type & **seekp** (off\_type, **ios\_base::seekdir**)\
 Changing the current write position.  \_\_ostream\_type & **seekp** (pos\_type)\
 Changing the current write position.  **fmtflags** **setf** (**fmtflags** \_\_fmtfl)\
 Setting new format flags.  **fmtflags** **setf** (**fmtflags** \_\_fmtfl, **fmtflags** \_\_mask)\
 Setting new format flags.  void **setstate** (**iostate** \_\_state)\
 Sets additional flags in the error state.  \_\_string\_type **str** () &&\
 \_\_string\_type **str** () const &\
 Copying out the string buffer.  void **str** (\_\_string\_type &&\_\_s)\
 void **str** (const \_\_string\_type &\_\_s)\
 Setting a new buffer.  template\<\_\_allocator\_like \_SAlloc\> **basic\_string**\< \_CharT, \_Traits, \_SAlloc \> **str** (const \_SAlloc &\_\_sa) const\
 template\<\_\_allocator\_like \_SAlloc\> void **str** (const **basic\_string**\< \_CharT, \_Traits, \_SAlloc \> &\_\_s)\
 void **swap** (**basic\_stringstream** &\_\_rhs)\
 pos\_type **tellp** ()\
 Getting the current write position.  **basic\_ostream**\< \_CharT, \_Traits \> \* **tie** () const\
 Fetches the current *tied* stream.  **basic\_ostream**\< \_CharT, \_Traits \> \* **tie** (**basic\_ostream**\< \_CharT, \_Traits \> \*\_\_tiestr)\
 Ties this stream to an output stream.  void **unsetf** (**fmtflags** \_\_mask)\
 Clearing format flags.  **basic\_string\_view**\< char\_type, traits\_type \> **view** () const noexcept\
 char\_type **widen** (char \_\_c) const\
 Widens characters.  **streamsize** **width** () const\
 Flags access.  **streamsize** **width** (**streamsize** \_\_wide)\
 Changing flags.

\_\_istream\_type & **operator\>\>** (\_\_istream\_type &(\*\_\_pf)(\_\_istream\_type &))\
 Interface for manipulators.  \_\_istream\_type & **operator\>\>** (\_\_ios\_type &(\*\_\_pf)(\_\_ios\_type &))\
 Interface for manipulators.  \_\_istream\_type & **operator\>\>** (**ios\_base** &(\*\_\_pf)(**ios\_base** &))\
 Interface for manipulators.

**Extractors**\
 All the operator\>\> functions (aka *formatted input functions*) have some common behavior. Each starts by constructing a temporary object of type std::basic\_istream::sentry with the second argument (noskipws) set to false. This has several effects, concluding with the setting of a status flag; see the sentry documentation for more.

If the sentry status is good, the function tries to extract whatever data is appropriate for the type of the argument.

If an exception is thrown during extraction, ios\_base::badbit will be turned on in the stream's error state (without causing an ios\_base::failure to be thrown) and the original exception will be rethrown if badbit is set in the exceptions mask.

\_\_istream\_type & **operator\>\>** (bool &\_\_n)\
 Integer arithmetic extractors.  \_\_istream\_type & **operator\>\>** (short &\_\_n)\
 Integer arithmetic extractors.  \_\_istream\_type & **operator\>\>** (unsigned short &\_\_n)\
 Integer arithmetic extractors.  \_\_istream\_type & **operator\>\>** (int &\_\_n)\
 Integer arithmetic extractors.  \_\_istream\_type & **operator\>\>** (unsigned int &\_\_n)\
 Integer arithmetic extractors.  \_\_istream\_type & **operator\>\>** (long &\_\_n)\
 Integer arithmetic extractors.  \_\_istream\_type & **operator\>\>** (unsigned long &\_\_n)\
 Integer arithmetic extractors.  \_\_istream\_type & **operator\>\>** (long long &\_\_n)\
 Integer arithmetic extractors.  \_\_istream\_type & **operator\>\>** (unsigned long long &\_\_n)\
 Integer arithmetic extractors.

\_\_istream\_type & **operator\>\>** (float &\_\_f)\
 Floating point arithmetic extractors.  \_\_istream\_type & **operator\>\>** (double &\_\_f)\
 Floating point arithmetic extractors.  \_\_istream\_type & **operator\>\>** (long double &\_\_f)\
 Floating point arithmetic extractors.

**Unformatted Input Functions**\
 All the unformatted input functions have some common behavior. Each starts by constructing a temporary object of type std::basic\_istream::sentry with the second argument (noskipws) set to true. This has several effects, concluding with the setting of a status flag; see the sentry documentation for more.

If the sentry status is good, the function tries to extract whatever data is appropriate for the type of the argument.

The number of characters extracted is stored for later retrieval by gcount().

If an exception is thrown during extraction, ios\_base::badbit will be turned on in the stream's error state (without causing an ios\_base::failure to be thrown) and the original exception will be rethrown if badbit is set in the exceptions mask.

int\_type **get** ()\
 Simple extraction.  \_\_istream\_type & **get** (char\_type &\_\_c)\
 Simple extraction.  \_\_istream\_type & **get** (char\_type \*\_\_s, **streamsize** \_\_n, char\_type \_\_delim)\
 Simple multiple-character extraction.  \_\_istream\_type & **get** (char\_type \*\_\_s, **streamsize** \_\_n)\
 Simple multiple-character extraction.  \_\_istream\_type & **get** (\_\_streambuf\_type &\_\_sb, char\_type \_\_delim)\
 Extraction into another streambuf.  \_\_istream\_type & **get** (\_\_streambuf\_type &\_\_sb)\
 Extraction into another streambuf.  \_\_istream\_type & **getline** (char\_type \*\_\_s, **streamsize** \_\_n, char\_type \_\_delim)\
 String extraction.  \_\_istream\_type & **getline** (char\_type \*\_\_s, **streamsize** \_\_n)\
 String extraction.  \_\_istream\_type & **ignore** (**streamsize** \_\_n, int\_type \_\_delim)\
 Discarding characters.  \_\_istream\_type & **ignore** (**streamsize** \_\_n)\
 Simple extraction.  \_\_istream\_type & **ignore** ()\
 Simple extraction.  \_\_istream\_type & **ignore** (**streamsize** \_\_n, char \_\_delim)\
 Simple extraction.  int\_type **peek** ()\
 Looking ahead in the stream.  \_\_istream\_type & **read** (char\_type \*\_\_s, **streamsize** \_\_n)\
 Extraction without delimiters.  **streamsize** **readsome** (char\_type \*\_\_s, **streamsize** \_\_n)\
 Extraction until the buffer is exhausted, but no more.  \_\_istream\_type & **putback** (char\_type \_\_c)\
 Unextracting a single character.  \_\_istream\_type & **unget** ()\
 Unextracting the previous character.  int **sync** ()\
 Synchronizing the stream buffer.  pos\_type **tellg** ()\
 Getting the current read position.  \_\_istream\_type & **seekg** (pos\_type)\
 Changing the current read position.  \_\_istream\_type & **seekg** (off\_type, **ios\_base::seekdir**)\
 Changing the current read position.

**operator bool** () const\
 The quick-and-easy status check.  bool **operator!** () const\
 The quick-and-easy status check.

\_\_ostream\_type & **operator\<\<** (\_\_ostream\_type &(\*\_\_pf)(\_\_ostream\_type &))\
 Interface for manipulators.  \_\_ostream\_type & **operator\<\<** (\_\_ios\_type &(\*\_\_pf)(\_\_ios\_type &))\
 Interface for manipulators.  \_\_ostream\_type & **operator\<\<** (**ios\_base** &(\*\_\_pf)(**ios\_base** &))\
 Interface for manipulators.

**Inserters**\
 All the operator\<\< functions (aka *formatted output functions*) have some common behavior. Each starts by constructing a temporary object of type std::basic\_ostream::sentry. This can have several effects, concluding with the setting of a status flag; see the sentry documentation for more.

If the sentry status is good, the function tries to generate whatever data is appropriate for the type of the argument.

If an exception is thrown during insertion, ios\_base::badbit will be turned on in the stream's error state without causing an ios\_base::failure to be thrown. The original exception will then be rethrown.

\_\_ostream\_type & **operator\<\<** (long \_\_n)\
 Integer arithmetic inserters.  \_\_ostream\_type & **operator\<\<** (unsigned long \_\_n)\
 Integer arithmetic inserters.  \_\_ostream\_type & **operator\<\<** (bool \_\_n)\
 Integer arithmetic inserters.  \_\_ostream\_type & **operator\<\<** (short \_\_n)\
 Integer arithmetic inserters.  \_\_ostream\_type & **operator\<\<** (unsigned short \_\_n)\
 Integer arithmetic inserters.  \_\_ostream\_type & **operator\<\<** (int \_\_n)\
 Integer arithmetic inserters.  \_\_ostream\_type & **operator\<\<** (unsigned int \_\_n)\
 Integer arithmetic inserters.  \_\_ostream\_type & **operator\<\<** (long long \_\_n)\
 Integer arithmetic inserters.  \_\_ostream\_type & **operator\<\<** (unsigned long long \_\_n)\
 Integer arithmetic inserters.

\_\_ostream\_type & **operator\<\<** (double \_\_f)\
 Floating point arithmetic inserters.  \_\_ostream\_type & **operator\<\<** (float \_\_f)\
 Floating point arithmetic inserters.  \_\_ostream\_type & **operator\<\<** (long double \_\_f)\
 Floating point arithmetic inserters.

**Unformatted Output Functions**\
 All the unformatted output functions have some common behavior. Each starts by constructing a temporary object of type std::basic\_ostream::sentry. This has several effects, concluding with the setting of a status flag; see the sentry documentation for more.

If the sentry status is good, the function tries to generate whatever data is appropriate for the type of the argument.

If an exception is thrown during insertion, ios\_base::badbit will be turned on in the stream's error state. If badbit is on in the stream's exceptions mask, the exception will be rethrown without completing its actions.

\_\_ostream\_type & **put** (char\_type \_\_c)\
 Simple insertion.  \_\_ostream\_type & **write** (const char\_type \*\_\_s, **streamsize** \_\_n)\
 Character string insertion.

### Static Public Member Functions

static bool **sync\_with\_stdio** (bool \_\_sync=true)\
 Interaction with the standard C I/O objects.  static int **xalloc** ()  throw ()\
 Access to unique indices.

### Static Public Attributes

static const **openmode** **\_\_noreplace**\
 static const **fmtflags** **adjustfield**\
 A mask of left\|right\|internal. Useful for the 2-arg form of setf.  static const **openmode** **app**\
 Seek to end before each write.  static const **openmode** **ate**\
 Open and seek to end immediately after opening.  static const **iostate** **badbit**\
 Indicates a loss of integrity in an input or output sequence (such as an irrecoverable read error from a file).  static const **fmtflags** **basefield**\
 A mask of dec\|oct\|hex. Useful for the 2-arg form of setf.  static const **seekdir** **beg**\
 Request a seek relative to the beginning of the stream.  static const **openmode** **binary**\
 Perform input and output in binary mode (as opposed to text mode). This is probably not what you think it is; see https://gcc.gnu.org/onlinedocs/libstdc++/manual/fstreams.html#std.io.filestreams.binary.  static const **fmtflags** **boolalpha**\
 Insert/extract bool in alphabetic rather than numeric format.  static const **seekdir** **cur**\
 Request a seek relative to the current position within the sequence.  static const **fmtflags** **dec**\
 Converts integer input or generates integer output in decimal base.  static const **seekdir** **end**\
 Request a seek relative to the current end of the sequence.  static const **iostate** **eofbit**\
 Indicates that an input operation reached the end of an input sequence.  static const **iostate** **failbit**\
 Indicates that an input operation failed to read the expected characters, or that an output operation failed to generate the desired characters.  static const **fmtflags** **fixed**\
 Generate floating-point output in fixed-point notation.  static const **fmtflags** **floatfield**\
 A mask of scientific\|fixed. Useful for the 2-arg form of setf.  static const **iostate** **goodbit**\
 Indicates all is well.  static const **fmtflags** **hex**\
 Converts integer input or generates integer output in hexadecimal base.  static const **openmode** **in**\
 Open for input. Default for ifstream and fstream.  static const **fmtflags** **internal**\
 Adds fill characters at a designated internal point in certain generated output, or identical to right if no such point is designated.  static const **fmtflags** **left**\
 Adds fill characters on the right (final positions) of certain generated output. (I.e., the thing you print is flush left.).  static const **fmtflags** **oct**\
 Converts integer input or generates integer output in octal base.  static const **openmode** **out**\
 Open for output. Default for ofstream and fstream.  static const **fmtflags** **right**\
 Adds fill characters on the left (initial positions) of certain generated output. (I.e., the thing you print is flush right.).  static const **fmtflags** **scientific**\
 Generates floating-point output in scientific notation.  static const **fmtflags** **showbase**\
 Generates a prefix indicating the numeric base of generated integer output.  static const **fmtflags** **showpoint**\
 Generates a decimal-point character unconditionally in generated floating-point output.  static const **fmtflags** **showpos**\
 Generates a + sign in non-negative generated numeric output.  static const **fmtflags** **skipws**\
 Skips leading white space before certain input operations.  static const **openmode** **trunc**\
 Truncate an existing stream when opening. Default for ofstream.  static const **fmtflags** **unitbuf**\
 Flushes output after each output operation.  static const **fmtflags** **uppercase**\
 Replaces certain lowercase letters with their uppercase equivalents in generated output.

### Protected Types

enum { **\_S\_local\_word\_size** }\

### Protected Member Functions

void **\_M\_cache\_locale** (const **locale** &\_\_loc)\
 void **\_M\_call\_callbacks** (**event** \_\_ev)  throw ()\
 void **\_M\_dispose\_callbacks** (void)  throw ()\
 template\<typename \_ValueT\> \_\_istream\_type & **\_M\_extract** (\_ValueT &\_\_v)\
 \_Words & **\_M\_grow\_words** (int \_\_index, bool \_\_iword)\
 void **\_M\_init** ()  throw ()\
 template\<typename \_ValueT\> \_\_ostream\_type & **\_M\_insert** (\_ValueT \_\_v)\
 void **\_M\_move** (**ios\_base** &) noexcept\
 void **\_M\_swap** (**ios\_base** &\_\_rhs) noexcept\
 void **init** (**basic\_streambuf**\< \_CharT, \_Traits \> \*\_\_sb)\
 All setup is performed here.  void **move** (**basic\_ios** &&\_\_rhs)\
 void **move** (**basic\_ios** &\_\_rhs)\
 void **set\_rdbuf** (**basic\_streambuf**\< \_CharT, \_Traits \> \*\_\_sb)\
 void **swap** (**basic\_ios** &\_\_rhs) noexcept\
 void **swap** (**basic\_iostream** &\_\_rhs)\
 void **swap** (**basic\_istream** &\_\_rhs)\
 void **swap** (**basic\_ostream** &\_\_rhs)\

### Protected Attributes

\_Callback\_list \* **\_M\_callbacks**\
 const \_\_ctype\_type \* **\_M\_ctype**\
 **iostate** **\_M\_exception**\
 char\_type **\_M\_fill**\
 bool **\_M\_fill\_init**\
 **fmtflags** **\_M\_flags**\
 **streamsize** **\_M\_gcount**\
 **locale** **\_M\_ios\_locale**\
 \_Words **\_M\_local\_word** \[\_S\_local\_word\_size\]\
 const \_\_num\_get\_type \* **\_M\_num\_get**\
 const \_\_num\_put\_type \* **\_M\_num\_put**\
 **streamsize** **\_M\_precision**\
 **basic\_streambuf**\< \_CharT, \_Traits \> \* **\_M\_streambuf**\
 **iostate** **\_M\_streambuf\_state**\
 **basic\_ostream**\< \_CharT, \_Traits \> \* **\_M\_tie**\
 **streamsize** **\_M\_width**\
 \_Words \* **\_M\_word**\
 int **\_M\_word\_size**\
 \_Words **\_M\_word\_zero**\

## Detailed Description

### template\<typename \_CharT, typename \_Traits, typename \_Alloc\>

class std::basic\_stringstream\< \_CharT, \_Traits, \_Alloc \>"Controlling input and 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 reading from and writing to objects of type std::basic\_string, using the inherited functions from std::basic\_iostream. To control the associated sequence, an instance of std::basic\_stringbuf is used, which this page refers to as sb.

## Member Typedef Documentation

### typedef void(\* std::ios\_base::event\_callback) (event \_\_e, ios\_base &\_\_b, int \_\_i) \[inherited\]

The type of an event callback function.

**Parameters**

*\_\_e* One of the members of the event enum. \
 *\_\_b* Reference to the ios\_base object. \
 *\_\_i* The integer provided when the callback was registered.

Event callbacks are user defined functions that get called during several ios\_base and basic\_ios functions, specifically imbue(), copyfmt(), and ~ios().

### typedef \_Ios\_Fmtflags std::ios\_base::fmtflags \[inherited\]

This is a bitmask type. *\_Ios\_Fmtflags* is *implementation-defined, but it is valid to perform bitwise operations on these values and expect the Right Thing to happen. Defined objects of type fmtflags are:*

- •

  *boolalpha*

- •

  *dec*

- •

  *fixed*

- •

  *hex*

- •

  *internal*

- •

  *left*

- •

  *oct*

- •

  *right*

- •

  *scientific*

- •

  *showbase*

- •

  *showpoint*

- •

  *showpos*

- •

  *skipws*

- •

  *unitbuf*

- •

  *uppercase*

- •

  *adjustfield*

- •

  *basefield*

- •

  *floatfield*

### typedef \_Ios\_Iostate std::ios\_base::iostate \[inherited\]

*This is a bitmask type. \_Ios\_Iostate* is *implementation-defined, but it is valid to perform bitwise operations on these values and expect the Right Thing to happen. Defined objects of type iostate are:*

- •

  *badbit*

- •

  *eofbit*

- •

  *failbit*

- •

  *goodbit*

### typedef \_Ios\_Openmode std::ios\_base::openmode \[inherited\]

*This is a bitmask type. \_Ios\_Openmode* is *implementation-defined, but it is valid to perform bitwise operations on these values and expect the Right Thing to happen. Defined objects of type openmode are:*

- •

  *app*

- •

  *ate*

- •

  *binary*

- •

  *in*

- •

  *out*

- •

  *trunc*

### typedef \_Ios\_Seekdir std::ios\_base::seekdir \[inherited\]

*This is an enumerated type. \_Ios\_Seekdir* is *implementation-defined. Defined values of type seekdir are:*

- •

  *beg*

- •

  *cur, equivalent to* SEEK\_CUR *in the C standard library.*

- •

  *end, equivalent to* SEEK\_END *in the C standard library.*

## Member Enumeration Documentation

### enum std::ios\_base::event \[inherited\]

*The set of events that may be passed to an event callback. erase\_event is used during ~ios() and copyfmt(). imbue\_event is used during imbue(). copyfmt\_event is used during copyfmt().*

## Constructor & Destructor Documentation

### template\<typename \_CharT, typename \_Traits, typename \_Alloc\> std::basic\_stringstream\< \_CharT, \_Traits, \_Alloc \>::basic\_stringstream () \[inline\]

*Default constructor starts with an empty string buffer. Initializes* sb *using the mode* in\|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.*

### template\<typename \_CharT, typename \_Traits, typename \_Alloc\> std::basic\_stringstream\< \_CharT, \_Traits, \_Alloc \>::basic\_stringstream (ios\_base::openmode \_\_m) \[inline\], \[explicit\]

*Starts with an empty string buffer.*

**Parameters**

*\_\_m Whether the buffer can read, or write, or both.*

*Initializes* sb *using the mode from* \_\_m*, 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.*

### template\<typename \_CharT, typename \_Traits, typename \_Alloc\> std::basic\_stringstream\< \_CharT, \_Traits, \_Alloc \>::basic\_stringstream (const \_\_string\_type & \_\_str, ios\_base::openmode \_\_m = ios\_base::out \| ios\_base::in) \[inline\], \[explicit\]

*Starts with an existing string buffer.*

**Parameters**

*\_\_str A string to copy as a starting buffer.* \
 *\_\_m Whether the buffer can read, or write, or both.*

*Initializes* sb *using \_\_str and* \_\_m*, 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.*

### template\<typename \_CharT, typename \_Traits, typename \_Alloc\> std::basic\_stringstream\< \_CharT, \_Traits, \_Alloc \>::~basic\_stringstream () \[inline\]

*The destructor does nothing. The buffer is deallocated by the stringbuf object, not the formatting stream.*

## Member Function Documentation

### const locale & std::ios\_base::\_M\_getloc () const \[inline\], \[inherited\]

*Locale access.*

**Returns**

*A reference to the current locale.*

*Like getloc above, but returns a reference instead of generating a copy.*

*Referenced by* **std::money\_get\< \_CharT, \_InIter \>::do\_get()***,* **std::num\_get\< \_CharT, \_InIter \>::do\_get()***,* **std::time\_get\< \_CharT, \_InIter \>::do\_get()***,* **std::time\_get\< \_CharT, \_InIter \>::do\_get\_date()***,* **std::time\_get\< \_CharT, \_InIter \>::do\_get\_monthname()***,* **std::time\_get\< \_CharT, \_InIter \>::do\_get\_time()***,* **std::time\_get\< \_CharT, \_InIter \>::do\_get\_weekday()***,* **std::time\_get\< \_CharT, \_InIter \>::do\_get\_year()***,* **std::num\_put\< \_CharT, \_OutIter \>::do\_put()***,* **std::time\_put\< \_CharT, \_OutIter \>::do\_put()***,* **std::time\_get\< \_CharT, \_InIter \>::get()***, and* **std::time\_put\< \_CharT, \_OutIter \>::put()***.*

### template\<typename \_CharT, typename \_Traits\> bool std::basic\_ios\< \_CharT, \_Traits \>::bad () const \[inline\], \[nodiscard\], \[inherited\]

*Fast error checking.*

**Returns**

*True if the badbit is set.*

*Note that other iostate flags may also be set.*

*Referenced by* **std::basic\_ostream\< \_CharT, \_Traits \>::sentry::sentry()***.*

### template\<typename \_CharT, typename \_Traits\> void std::basic\_ios\< \_CharT, \_Traits \>::clear (iostate \_\_state = goodbit) \[inherited\]

*\[Re\]sets the error state.*

**Parameters**

*\_\_state The new state flag(s) to set.*

*See std::ios\_base::iostate for the possible bit values. Most users will not need to pass an argument.*

*References* **std::ios\_base::badbit***,* **exceptions()***,* **rdbuf()***, and* **rdstate()***.*

*Referenced by* **std::basic\_ios\< char\_type, traits\_type \>::exceptions()***,* **std::basic\_fstream\< char \>::open()***,* **std::basic\_fstream\< char \>::open()***,* **std::basic\_ifstream\< char \>::open()***,* **std::basic\_ifstream\< char \>::open()***,* **std::basic\_ofstream\< char \>::open()***,* **std::basic\_ofstream\< char \>::open()***,* **std::\_\_detail::operator\>\>()***,* **std::basic\_istream\< \_CharT, \_Traits \>::putback()***,* **rdbuf()***,* **std::basic\_istream\< \_CharT, \_Traits \>::seekg()***,* **std::basic\_istream\< \_CharT, \_Traits \>::seekg()***,* **std::basic\_ios\< char\_type, traits\_type \>::setstate()***, and* **std::basic\_istream\< \_CharT, \_Traits \>::unget()***.*

### template\<typename \_CharT, typename \_Traits\> basic\_ios\< \_CharT, \_Traits \> & std::basic\_ios\< \_CharT, \_Traits \>::copyfmt (const basic\_ios\< \_CharT, \_Traits \> & \_\_rhs) \[inherited\]

*Copies fields of \_\_rhs into this.*

**Parameters**

*\_\_rhs The source values for the copies.*

**Returns**

*Reference to this object.*

*All fields of \_\_rhs are copied into this object except that rdbuf() and rdstate() remain unchanged. All values in the pword and iword arrays are copied. Before copying, each callback is invoked with erase\_event. After copying, each (new) callback is invoked with copyfmt\_event. The final step is to copy exceptions().*

*References* **basic\_ios()***,* **std::\_\_addressof()***,* **exceptions()***,* **fill()***,* **std::ios\_base::flags()***,* **std::ios\_base::getloc()***,* **std::ios\_base::precision()***,* **tie()***,* **std::tie()***, and* **std::ios\_base::width()***.*

### template\<typename \_CharT, typename \_Traits\> bool std::basic\_ios\< \_CharT, \_Traits \>::eof () const \[inline\], \[nodiscard\], \[inherited\]

*Fast error checking.*

**Returns**

*True if the eofbit is set.*

*Note that other iostate flags may also be set.*

### template\<typename \_CharT, typename \_Traits\> iostate std::basic\_ios\< \_CharT, \_Traits \>::exceptions () const \[inline\], \[nodiscard\], \[inherited\]

*Throwing exceptions on errors.*

**Returns**

*The current exceptions mask.*

*This changes nothing in the stream. See the one-argument version of exceptions(iostate) for the meaning of the return value.*

*Referenced by* **clear()***, and* **copyfmt()***.*

### template\<typename \_CharT, typename \_Traits\> void std::basic\_ios\< \_CharT, \_Traits \>::exceptions (iostate \_\_except) \[inline\], \[inherited\]

*Throwing exceptions on errors.*

**Parameters**

*\_\_except The new exceptions mask.*

*By default, error flags are set silently. You can set an exceptions mask for each stream; if a bit in the mask becomes set in the error flags, then an exception of type std::ios\_base::failure is thrown.*

*If the error flag is already set when the exceptions mask is added, the exception is immediately thrown. Try running the following under GCC 3.1 or later:*

```
#include <iostream>
#include <fstream>
#include <exception>
int main()
{
    std::set_terminate (__gnu_cxx::__verbose_terminate_handler);
    std::ifstream f ("/etc/motd");
    std::cerr << "Setting badbit\n";
    f.setstate (std::ios_base::badbit);
    std::cerr << "Setting exception mask\n";
    f.exceptions (std::ios_base::badbit);
}
```

### template\<typename \_CharT, typename \_Traits\> bool std::basic\_ios\< \_CharT, \_Traits \>::fail () const \[inline\], \[nodiscard\], \[inherited\]

*Fast error checking.*

**Returns**

*True if either the badbit or the failbit is set.*

*Checking the badbit in fail() is historical practice. Note that other iostate flags may also be set.*

*Referenced by* **std::basic\_ios\< char\_type, traits\_type \>::operator bool()***,* **std::basic\_ios\< char\_type, traits\_type \>::operator!()***,* **std::basic\_istream\< \_CharT, \_Traits \>::seekg()***,* **std::basic\_istream\< \_CharT, \_Traits \>::seekg()***,* **std::basic\_ostream\< \_CharT, \_Traits \>::seekp()***,* **std::basic\_ostream\< \_CharT, \_Traits \>::seekp()***,* **std::basic\_istream\< \_CharT, \_Traits \>::tellg()***, and* **std::basic\_ostream\< \_CharT, \_Traits \>::tellp()***.*

### template\<typename \_CharT, typename \_Traits\> char\_type std::basic\_ios\< \_CharT, \_Traits \>::fill () const \[inline\], \[nodiscard\], \[inherited\]

*Retrieves the empty character.*

**Returns**

*The current fill character.*

*It defaults to a space (' ') in the current locale.*

*Referenced by* **copyfmt()***, and* **std::philox\_engine\< uint\_fast32\_t, 32, 4, 10, 0xCD9E8D57, 0x9E3779B9, 0xD2511F53, 0xBB67AE85 \>::operator\<\<***.*

### template\<typename \_CharT, typename \_Traits\> char\_type std::basic\_ios\< \_CharT, \_Traits \>::fill (char\_type \_\_ch) \[inline\], \[inherited\]

*Sets a new empty character.*

**Parameters**

*\_\_ch The new character.*

**Returns**

*The previous fill character.*

*The fill character is used to fill out space when P+ characters have been requested (e.g., via setw), Q characters are actually used, and Q\<P. It defaults to a space (' ') in the current locale.*

### fmtflags std::ios\_base::flags () const \[inline\], \[nodiscard\], \[inherited\]

*Access to format flags.*

**Returns**

*The format control flags for both input and output.*

*Referenced by* **std::basic\_ios\< \_CharT, \_Traits \>::copyfmt()***,* **std::num\_get\< \_CharT, \_InIter \>::do\_get()***,* **std::num\_get\< \_CharT, \_InIter \>::do\_get()***,* **std::num\_put\< \_CharT, \_OutIter \>::do\_put()***,* **std::num\_put\< \_CharT, \_OutIter \>::do\_put()***,* **std::chrono::operator\<\<()***,* **std::philox\_engine\< uint\_fast32\_t, 32, 4, 10, 0xCD9E8D57, 0x9E3779B9, 0xD2511F53, 0xBB67AE85 \>::operator\<\<***,* **std::\_\_detail::operator\>\>()***,* **std::operator\>\>()***,* **std::operator\>\>()***,* **std::operator\>\>()***,* **std::operator\>\>()***,* **std::operator\>\>()***,* **std::operator\>\>()***,* **std::operator\>\>()***, and* **std::philox\_engine\< uint\_fast32\_t, 32, 4, 10, 0xCD9E8D57, 0x9E3779B9, 0xD2511F53, 0xBB67AE85 \>::operator\>\>***.*

### fmtflags std::ios\_base::flags (fmtflags \_\_fmtfl) \[inline\], \[inherited\]

*Setting new format flags all at once.*

**Parameters**

*\_\_fmtfl The new flags to set.*

**Returns**

*The previous format control flags.*

*This function overwrites all the format flags with \_\_fmtfl.*

### template\<typename \_CharT, typename \_Traits\> basic\_ostream\< \_CharT, \_Traits \> & std::basic\_ostream\< \_CharT, \_Traits \>::flush () \[inherited\]

*Synchronizing the stream buffer.*

**Returns**

*\*this*

*If* rdbuf() *is a null pointer, changes nothing.*

*Otherwise, calls* rdbuf()-\>pubsync()*, and if that returns -1, sets badbit.*

*References* **std::ios\_base::badbit***,* **std::ios\_base::goodbit***,* **std::basic\_ios\< \_CharT, \_Traits \>::rdbuf()***, and* **std::basic\_ios\< \_CharT, \_Traits \>::setstate()***.*

*Referenced by* **std::flush()***.*

### template\<typename \_CharT, typename \_Traits\> streamsize std::basic\_istream\< \_CharT, \_Traits \>::gcount () const \[inline\], \[inherited\]

*Character counting.*

**Returns**

*The number of characters extracted by the previous unformatted input function dispatched for this stream.*

### template\<typename \_CharT, typename \_Traits\> basic\_istream\< \_CharT, \_Traits \>::int\_type std::basic\_istream\< \_CharT, \_Traits \>::get (void ) \[inherited\]

*Simple extraction.*

**Returns**

*A character, or eof().*

*Tries to extract a character. If none are available, sets failbit and returns traits::eof().*

*References* **\_M\_gcount***,* **std::ios\_base::badbit***,* **std::ios\_base::eofbit***,* **std::ios\_base::failbit***,* **std::ios\_base::goodbit***,* **std::basic\_ios\< \_CharT, \_Traits \>::rdbuf()***, and* **std::basic\_ios\< \_CharT, \_Traits \>::setstate()***.*

*Referenced by* **std::basic\_istream\< char\_type, traits\_type \>::get()***, and* **std::basic\_istream\< char\_type, traits\_type \>::get()***.*

### template\<typename \_CharT, typename \_Traits\> \_\_istream\_type & std::basic\_istream\< \_CharT, \_Traits \>::get (\_\_streambuf\_type & \_\_sb) \[inline\], \[inherited\]

*Extraction into another streambuf.*

**Parameters**

*\_\_sb A streambuf in which to store data.*

**Returns**

*\*this*

*Returns* get*(\_\_sb,widen('\\n')).*

### template\<typename \_CharT, typename \_Traits\> basic\_istream\< \_CharT, \_Traits \> & std::basic\_istream\< \_CharT, \_Traits \>::get (\_\_streambuf\_type & \_\_sb, char\_type \_\_delim) \[inherited\]

*Extraction into another streambuf.*

**Parameters**

*\_\_sb A streambuf in which to store data.* \
 *\_\_delim A "stop" character.*

**Returns**

*\*this*

*Characters are extracted and inserted into \_\_sb until one of the following happens:*

- •

  *the input sequence reaches EOF*

- •

  *insertion into the output buffer fails (in this case, the character that would have been inserted is not extracted)*

- •

  *the next character equals \_\_delim (in this case, the character is not extracted)*

- •

  *an exception occurs (and in this case is caught)*

*If no characters are stored, failbit is set in the stream's error state.*

*References* **\_M\_gcount***,* **std::ios\_base::goodbit***,* **std::basic\_ios\< \_CharT, \_Traits \>::rdbuf()***, and* **std::basic\_streambuf\< \_CharT, \_Traits \>::sgetc()***.*

### template\<typename \_CharT, typename \_Traits\> basic\_istream\< \_CharT, \_Traits \> & std::basic\_istream\< \_CharT, \_Traits \>::get (char\_type & \_\_c) \[inherited\]

*Simple extraction.*

**Parameters**

*\_\_c The character in which to store data.*

**Returns**

*\*this*

*Tries to extract a character and store it in \_\_c. If none are available, sets failbit and returns traits::eof().*

**Note**

*This function is not overloaded on signed char and unsigned char.*

*References* **\_M\_gcount***,* **std::ios\_base::badbit***,* **std::ios\_base::eofbit***,* **std::ios\_base::failbit***,* **std::ios\_base::goodbit***,* **std::basic\_ios\< \_CharT, \_Traits \>::rdbuf()***, and* **std::basic\_ios\< \_CharT, \_Traits \>::setstate()***.*

### template\<typename \_CharT, typename \_Traits\> \_\_istream\_type & std::basic\_istream\< \_CharT, \_Traits \>::get (char\_type \* \_\_s, streamsize \_\_n) \[inline\], \[inherited\]

*Simple multiple-character extraction.*

**Parameters**

*\_\_s Pointer to an array.* \
 *\_\_n Maximum number of characters to store in s.*

**Returns**

*\*this*

*Returns* get*(\_\_s,\_\_n,widen('\\n')).*

### template\<typename \_CharT, typename \_Traits\> basic\_istream\< \_CharT, \_Traits \> & std::basic\_istream\< \_CharT, \_Traits \>::get (char\_type \* \_\_s, streamsize \_\_n, char\_type \_\_delim) \[inherited\]

*Simple multiple-character extraction.*

**Parameters**

*\_\_s Pointer to an array.* \
 *\_\_n Maximum number of characters to store in \_\_s.* \
 *\_\_delim A "stop" character.*

**Returns**

*\*this*

*Characters are extracted and stored into \_\_s until one of the following happens:*

- •

  \_\_n-1 *characters are stored*

- •

  *the input sequence reaches EOF*

- •

  *the next character equals \_\_delim, in which case the character is not extracted*

*If no characters are stored, failbit is set in the stream's error state.*

*In any case, a null character is stored into the next location in the array.*

**Note**

*This function is not overloaded on signed char and unsigned char.*

*References* **\_M\_gcount***,* **std::ios\_base::goodbit***,* **std::basic\_ios\< \_CharT, \_Traits \>::rdbuf()***, and* **std::basic\_streambuf\< \_CharT, \_Traits \>::sgetc()***.*

### template\<typename \_CharT, typename \_Traits\> \_\_istream\_type & std::basic\_istream\< \_CharT, \_Traits \>::getline (char\_type \* \_\_s, streamsize \_\_n) \[inline\], \[inherited\]

*String extraction.*

**Parameters**

*\_\_s A character array in which to store the data.* \
 *\_\_n Maximum number of characters to extract.*

**Returns**

*\*this*

*Returns* getline*(\_\_s,\_\_n,widen('\\n')).*

### basic\_istream\< char \> & std::basic\_istream\< char \>::getline (char\_type \* \_\_s, streamsize \_\_n, char\_type \_\_delim) \[inherited\]

*Explicit specialization declarations, defined in src/istream.cc.*

### template\<typename \_CharT, typename \_Traits\> basic\_istream\< \_CharT, \_Traits \> & std::basic\_istream\< \_CharT, \_Traits \>::getline (char\_type \* \_\_s, streamsize \_\_n, char\_type \_\_delim) \[inherited\]

*String extraction.*

**Parameters**

*\_\_s A character array in which to store the data.* \
 *\_\_n Maximum number of characters to extract.* \
 *\_\_delim A "stop" character.*

**Returns**

*\*this*

*Extracts and stores characters into \_\_s until one of the following happens. Note that these criteria are required to be tested in the order listed here, to allow an input line to exactly fill the \_\_s array without setting failbit.*

- 1\.

  *the input sequence reaches end-of-file, in which case eofbit is set in the stream error state*

- 2\.

  *the next character equals* \_\_delim*, in which case the character is extracted (and therefore counted in* gcount()*) but not stored*

- 3\.

  \_\_n-1 *characters are stored, in which case failbit is set in the stream error state*

*If no characters are extracted, failbit is set. (An empty line of input should therefore not cause failbit to be set.)*

*In any case, a null character is stored in the next location in the array.*

*Referenced by* **std::basic\_istream\< char\_type, traits\_type \>::getline()***.*

### locale std::ios\_base::getloc () const \[inline\], \[nodiscard\], \[inherited\]

*Locale access.*

**Returns**

*A copy of the current locale.*

*If* imbue(loc) *has previously been called, then this function returns* loc*. Otherwise, it returns a copy of* std::locale()*, the global C++ locale.*

*Referenced by* **std::basic\_ios\< \_CharT, \_Traits \>::copyfmt()***,* **std::money\_put\< \_CharT, \_OutIter \>::do\_put()***,* **std::basic\_ios\< \_CharT, \_Traits \>::imbue()***,* **std::chrono::operator\<\<()***,* **std::operator\>\>()***,* **std::operator\>\>()***, and* **std::ws()***.*

### template\<typename \_CharT, typename \_Traits\> bool std::basic\_ios\< \_CharT, \_Traits \>::good () const \[inline\], \[nodiscard\], \[inherited\]

*Fast error checking.*

**Returns**

*True if no error flags are set.*

*A wrapper around rdstate.*

*Referenced by* **std::basic\_istream\< \_CharT, \_Traits \>::sentry::sentry()***,* **std::basic\_ostream\< \_CharT, \_Traits \>::sentry::sentry()***, and* **std::\_\_detail::operator\>\>()***.*

### template\<typename \_CharT, typename \_Traits\> basic\_istream\< \_CharT, \_Traits \> & std::basic\_istream\< \_CharT, \_Traits \>::ignore (void ) \[inherited\]

*Simple extraction.*

**Returns**

*A character, or eof().*

*Tries to extract a character. If none are available, sets failbit and returns traits::eof().*

*References* **\_M\_gcount***,* **std::ios\_base::eofbit***,* **std::ios\_base::goodbit***,* **std::basic\_ios\< \_CharT, \_Traits \>::rdbuf()***, and* **std::basic\_streambuf\< \_CharT, \_Traits \>::sbumpc()***.*

*Referenced by* **std::basic\_istream\< char\_type, traits\_type \>::ignore()***.*

### template\<typename \_CharT, typename \_Traits\> basic\_istream\< \_CharT, \_Traits \> & std::basic\_istream\< \_CharT, \_Traits \>::ignore (streamsize \_\_n) \[inherited\]

*Simple extraction.*

**Returns**

*A character, or eof().*

*Tries to extract a character. If none are available, sets failbit and returns traits::eof().*

*References* **\_M\_gcount***,* **std::ios\_base::goodbit***,* **std::basic\_ios\< \_CharT, \_Traits \>::rdbuf()***, and* **std::basic\_streambuf\< \_CharT, \_Traits \>::sgetc()***.*

### template\<typename \_CharT, typename \_Traits\> \_\_istream\_type & std::basic\_istream\< \_CharT, \_Traits \>::ignore (streamsize \_\_n, char \_\_delim) \[inline\], \[inherited\]

*Simple extraction.*

**Returns**

*A character, or eof().*

*Tries to extract a character. If none are available, sets failbit and returns traits::eof().*

### template\<typename \_CharT, typename \_Traits\> basic\_istream\< \_CharT, \_Traits \> & std::basic\_istream\< \_CharT, \_Traits \>::ignore (streamsize \_\_n, int\_type \_\_delim) \[inherited\]

*Discarding characters.*

**Parameters**

*\_\_n Number of characters to discard.* \
 *\_\_delim A "stop" character.*

**Returns**

*\*this*

*Extracts characters and throws them away until one of the following happens:*

- •

  *if \_\_n* != std::numeric\_limits\<int\>::max()*, \_\_n characters are extracted*

- •

  *the input sequence reaches end-of-file*

- •

  *the next character equals \_\_delim (in this case, the character is extracted); note that this condition will never occur if \_\_delim equals* traits::eof()*.*

*NB: Provide four overloads, instead of the single function (with defaults) mandated by the Standard: this leads to a better performing implementation, while still conforming to the Standard.*

*References* **\_M\_gcount***, and* **std::ios\_base::goodbit***.*

### template\<typename \_CharT, typename \_Traits\> locale std::basic\_ios\< \_CharT, \_Traits \>::imbue (const locale & \_\_loc) \[inherited\]

*Moves to a new locale.*

**Parameters**

*\_\_loc The new locale.*

**Returns**

*The previous locale.*

*Calls* ios\_base::imbue(loc)*, and if a stream buffer is associated with this stream, calls that buffer's* pubimbue(loc)*.*

*Additional l10n notes are at https://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.html*

*References* **std::ios\_base::getloc()***,* **std::ios\_base::imbue()***, and* **rdbuf()***.*

*Referenced by* **std::chrono::operator\<\<()***.*

### template\<typename \_CharT, typename \_Traits\> void std::basic\_ios\< \_CharT, \_Traits \>::init (basic\_streambuf\< \_CharT, \_Traits \> \* \_\_sb) \[protected\], \[inherited\]

*All setup is performed here. This is called from the public constructor. It is not virtual and cannot be redefined.*

*Referenced by* **std::basic\_fstream\< char \>::basic\_fstream()***,* **std::basic\_fstream\< char \>::basic\_fstream()***,* **std::basic\_fstream\< char \>::basic\_fstream()***,* **std::basic\_ifstream\< char \>::basic\_ifstream()***,* **std::basic\_ifstream\< char \>::basic\_ifstream()***,* **std::basic\_ifstream\< char \>::basic\_ifstream()***,* **std::basic\_ios\< char\_type, traits\_type \>::basic\_ios()***,* **std::basic\_istream\< char\_type, traits\_type \>::basic\_istream()***,* **std::basic\_istringstream\< char \>::basic\_istringstream()***,* **std::basic\_istringstream\< char \>::basic\_istringstream()***,* **std::basic\_istringstream\< char \>::basic\_istringstream()***,* **std::basic\_ofstream\< char \>::basic\_ofstream()***,* **std::basic\_ofstream\< char \>::basic\_ofstream()***,* **std::basic\_ofstream\< char \>::basic\_ofstream()***,* **std::basic\_ostream\< char\_type, traits\_type \>::basic\_ostream()***,* **std::basic\_ostringstream\< char \>::basic\_ostringstream()***,* **std::basic\_ostringstream\< char \>::basic\_ostringstream()***,* **std::basic\_ostringstream\< char \>::basic\_ostringstream()***,* **std::basic\_stringstream\< char \>::basic\_stringstream()***,* **std::basic\_stringstream\< char \>::basic\_stringstream()***, and* **std::basic\_stringstream\< char \>::basic\_stringstream()***.*

### long & std::ios\_base::iword (int \_\_ix) \[inline\], \[inherited\]

*Access to integer array.*

**Parameters**

*\_\_ix Index into the array.*

**Returns**

*A reference to an integer associated with the index.*

*The iword function provides access to an array of integers that can be used for any purpose. The array grows as required to hold the supplied index. All integers in the array are initialized to 0.*

*The implementation reserves several indices. You should use xalloc to obtain an index that is safe to use. Also note that since the array can grow dynamically, it is not safe to hold onto the reference.*

*References* **iword()***.*

*Referenced by* **iword()***.*

### template\<typename \_CharT, typename \_Traits\> char std::basic\_ios\< \_CharT, \_Traits \>::narrow (char\_type \_\_c, char \_\_dfault) const \[inline\], \[inherited\]

*Squeezes characters.*

**Parameters**

*\_\_c The character to narrow.* \
 *\_\_dfault The character to narrow.*

**Returns**

*The narrowed character.*

*Maps a character of* char\_type *to a character of* char*, if possible.*

*Returns the result of*

```
std::use_facet<ctype<char_type> >(getloc()).narrow(c,dfault)
```

*Additional l10n notes are at https://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.html*

### template\<typename \_CharT, typename \_Traits\> std::basic\_ios\< \_CharT, \_Traits \>::operator bool () const \[inline\], \[explicit\], \[nodiscard\], \[inherited\]

*The quick-and-easy status check. This allows you to write constructs such as* if (!a\_stream) ... *and* while (a\_stream) ...

### template\<typename \_CharT, typename \_Traits\> bool std::basic\_ios\< \_CharT, \_Traits \>::operator! () const \[inline\], \[nodiscard\], \[inherited\]

*The quick-and-easy status check. This allows you to write constructs such as* if (!a\_stream) ... *and* while (a\_stream) ...

### template\<typename \_CharT, typename \_Traits\> \_\_ostream\_type & std::basic\_ostream\< \_CharT, \_Traits \>::operator\<\< (\_\_ios\_type &(\* \_\_pf )(\_\_ios\_type &)) \[inline\], \[inherited\]

*Interface for manipulators. Manipulators such as* std::endl *and* std::hex *use these functions in constructs like "std::cout \<\< std::endl". For more information, see the iomanip header.*

### template\<typename \_CharT, typename \_Traits\> \_\_ostream\_type & std::basic\_ostream\< \_CharT, \_Traits \>::operator\<\< (\_\_ostream\_type &(\* \_\_pf )(\_\_ostream\_type &)) \[inline\], \[inherited\]

*Interface for manipulators. Manipulators such as* std::endl *and* std::hex *use these functions in constructs like "std::cout \<\< std::endl". For more information, see the iomanip header.*

### template\<typename \_CharT, typename \_Traits\> basic\_ostream\< \_CharT, \_Traits \> & std::basic\_ostream\< \_CharT, \_Traits \>::operator\<\< (\_\_streambuf\_type \* \_\_sb) \[inherited\]

*Extracting from another streambuf.*

**Parameters**

*\_\_sb A pointer to a streambuf*

*This function behaves like one of the basic arithmetic extractors, in that it also constructs a sentry object and has the same error handling behavior.*

*If* \_\_sb *is NULL, the stream will set failbit in its error state.*

*Characters are extracted from* \_\_sb *and inserted into* \*this *until one of the following occurs:*

- •

  *the input stream reaches end-of-file,*

- •

  *insertion into the output sequence fails (in this case, the character that would have been inserted is not extracted), or*

- •

  *an exception occurs while getting a character from* \_\_sb*, which sets failbit in the error state*

*If the function inserts no characters, failbit is set.*

### template\<typename \_CharT, typename \_Traits\> \_\_ostream\_type & std::basic\_ostream\< \_CharT, \_Traits \>::operator\<\< (bool \_\_n) \[inline\], \[inherited\]

*Integer arithmetic inserters.*

**Parameters**

*\_\_n A variable of builtin integral type.*

**Returns**

\*this *if successful*

*These functions use the stream's current locale (specifically, the* num\_get *facet) to perform numeric formatting.*

### template\<typename \_CharT, typename \_Traits\> \_\_ostream\_type & std::basic\_ostream\< \_CharT, \_Traits \>::operator\<\< (const void \* \_\_p) \[inline\], \[inherited\]

*Pointer arithmetic inserters.*

**Parameters**

*\_\_p A variable of pointer type.*

**Returns**

\*this *if successful*

*These functions use the stream's current locale (specifically, the* num\_get *facet) to perform numeric formatting.*

### template\<typename \_CharT, typename \_Traits\> \_\_ostream\_type & std::basic\_ostream\< \_CharT, \_Traits \>::operator\<\< (double \_\_f) \[inline\], \[inherited\]

*Floating point arithmetic inserters.*

**Parameters**

*\_\_f A variable of builtin floating point type.*

**Returns**

\*this *if successful*

*These functions use the stream's current locale (specifically, the* num\_get *facet) to perform numeric formatting.*

### template\<typename \_CharT, typename \_Traits\> \_\_ostream\_type & std::basic\_ostream\< \_CharT, \_Traits \>::operator\<\< (float \_\_f) \[inline\], \[inherited\]

*Floating point arithmetic inserters.*

**Parameters**

*\_\_f A variable of builtin floating point type.*

**Returns**

\*this *if successful*

*These functions use the stream's current locale (specifically, the* num\_get *facet) to perform numeric formatting.*

### template\<typename \_CharT, typename \_Traits\> basic\_ostream\< \_CharT, \_Traits \> & std::basic\_ostream\< \_CharT, \_Traits \>::operator\<\< (int \_\_n) \[inherited\]

*Integer arithmetic inserters.*

**Parameters**

*\_\_n A variable of builtin integral type.*

**Returns**

\*this *if successful*

*These functions use the stream's current locale (specifically, the* num\_get *facet) to perform numeric formatting.*

### template\<typename \_CharT, typename \_Traits\> \_\_ostream\_type & std::basic\_ostream\< \_CharT, \_Traits \>::operator\<\< (ios\_base &(\* \_\_pf )(ios\_base &)) \[inline\], \[inherited\]

*Interface for manipulators. Manipulators such as* std::endl *and* std::hex *use these functions in constructs like "std::cout \<\< std::endl". For more information, see the iomanip header.*

### template\<typename \_CharT, typename \_Traits\> \_\_ostream\_type & std::basic\_ostream\< \_CharT, \_Traits \>::operator\<\< (long \_\_n) \[inline\], \[inherited\]

*Integer arithmetic inserters.*

**Parameters**

*\_\_n A variable of builtin integral type.*

**Returns**

\*this *if successful*

*These functions use the stream's current locale (specifically, the* num\_get *facet) to perform numeric formatting.*

### template\<typename \_CharT, typename \_Traits\> \_\_ostream\_type & std::basic\_ostream\< \_CharT, \_Traits \>::operator\<\< (long double \_\_f) \[inline\], \[inherited\]

*Floating point arithmetic inserters.*

**Parameters**

*\_\_f A variable of builtin floating point type.*

**Returns**

\*this *if successful*

*These functions use the stream's current locale (specifically, the* num\_get *facet) to perform numeric formatting.*

### template\<typename \_CharT, typename \_Traits\> \_\_ostream\_type & std::basic\_ostream\< \_CharT, \_Traits \>::operator\<\< (long long \_\_n) \[inline\], \[inherited\]

*Integer arithmetic inserters.*

**Parameters**

*\_\_n A variable of builtin integral type.*

**Returns**

\*this *if successful*

*These functions use the stream's current locale (specifically, the* num\_get *facet) to perform numeric formatting.*

### template\<typename \_CharT, typename \_Traits\> basic\_ostream\< \_CharT, \_Traits \> & std::basic\_ostream\< \_CharT, \_Traits \>::operator\<\< (short \_\_n) \[inherited\]

*Integer arithmetic inserters.*

**Parameters**

*\_\_n A variable of builtin integral type.*

**Returns**

\*this *if successful*

*These functions use the stream's current locale (specifically, the* num\_get *facet) to perform numeric formatting.*

*References* **basic\_ostream()***,* **std::ios\_base::badbit***,* **std::ostreambuf\_iterator\< \_CharT, \_Traits \>::failed()***,* **std::ios\_base::goodbit***,* **std::num\_put\< \_CharT, \_OutIter \>::put()***,* **std::basic\_ios\< \_CharT, \_Traits \>::setstate()***, and* **std::use\_facet()***.*

### template\<typename \_CharT, typename \_Traits\> \_\_ostream\_type & std::basic\_ostream\< \_CharT, \_Traits \>::operator\<\< (unsigned int \_\_n) \[inline\], \[inherited\]

*Integer arithmetic inserters.*

**Parameters**

*\_\_n A variable of builtin integral type.*

**Returns**

\*this *if successful*

*These functions use the stream's current locale (specifically, the* num\_get *facet) to perform numeric formatting.*

### template\<typename \_CharT, typename \_Traits\> \_\_ostream\_type & std::basic\_ostream\< \_CharT, \_Traits \>::operator\<\< (unsigned long \_\_n) \[inline\], \[inherited\]

*Integer arithmetic inserters.*

**Parameters**

*\_\_n A variable of builtin integral type.*

**Returns**

\*this *if successful*

*These functions use the stream's current locale (specifically, the* num\_get *facet) to perform numeric formatting.*

### template\<typename \_CharT, typename \_Traits\> \_\_ostream\_type & std::basic\_ostream\< \_CharT, \_Traits \>::operator\<\< (unsigned long long \_\_n) \[inline\], \[inherited\]

*Integer arithmetic inserters.*

**Parameters**

*\_\_n A variable of builtin integral type.*

**Returns**

\*this *if successful*

*These functions use the stream's current locale (specifically, the* num\_get *facet) to perform numeric formatting.*

### template\<typename \_CharT, typename \_Traits\> \_\_ostream\_type & std::basic\_ostream\< \_CharT, \_Traits \>::operator\<\< (unsigned short \_\_n) \[inline\], \[inherited\]

*Integer arithmetic inserters.*

**Parameters**

*\_\_n A variable of builtin integral type.*

**Returns**

\*this *if successful*

*These functions use the stream's current locale (specifically, the* num\_get *facet) to perform numeric formatting.*

### template\<typename \_CharT, typename \_Traits\> \_\_istream\_type & std::basic\_istream\< \_CharT, \_Traits \>::operator\>\> (\_\_ios\_type &(\* \_\_pf )(\_\_ios\_type &)) \[inline\], \[inherited\]

*Interface for manipulators. Manipulators such as* std::ws *and* std::dec *use these functions in constructs like* std::cin \>\> std::ws*. For more information, see the iomanip header.*

### template\<typename \_CharT, typename \_Traits\> \_\_istream\_type & std::basic\_istream\< \_CharT, \_Traits \>::operator\>\> (\_\_istream\_type &(\* \_\_pf )(\_\_istream\_type &)) \[inline\], \[inherited\]

*Interface for manipulators. Manipulators such as* std::ws *and* std::dec *use these functions in constructs like* std::cin \>\> std::ws*. For more information, see the iomanip header.*

### template\<typename \_CharT, typename \_Traits\> basic\_istream\< \_CharT, \_Traits \> & std::basic\_istream\< \_CharT, \_Traits \>::operator\>\> (\_\_streambuf\_type \* \_\_sb) \[inherited\]

*Extracting into another streambuf.*

**Parameters**

*\_\_sb A pointer to a streambuf*

*This function behaves like one of the basic arithmetic extractors, in that it also constructs a sentry object and has the same error handling behavior.*

*If* \_\_sb *is NULL, the stream will set failbit in its error state.*

*Characters are extracted from this stream and inserted into the* \_\_sb *streambuf until one of the following occurs:*

- •

  *the input stream reaches end-of-file,*

- •

  *insertion into the output buffer fails (in this case, the character that would have been inserted is not extracted), or*

- •

  *an exception occurs (and in this case is caught)*

*If the function inserts no characters, failbit is set.*

*References* **std::ios\_base::eofbit***,* **std::ios\_base::failbit***,* **std::ios\_base::goodbit***,* **std::basic\_ios\< \_CharT, \_Traits \>::rdbuf()***, and* **std::basic\_ios\< \_CharT, \_Traits \>::setstate()***.*

### template\<typename \_CharT, typename \_Traits\> \_\_istream\_type & std::basic\_istream\< \_CharT, \_Traits \>::operator\>\> (bool & \_\_n) \[inline\], \[inherited\]

*Integer arithmetic extractors.*

**Parameters**

*\_\_n A variable of builtin integral type.*

**Returns**

\*this *if successful*

*These functions use the stream's current locale (specifically, the* num\_get *facet) to parse the input data.*

### template\<typename \_CharT, typename \_Traits\> \_\_istream\_type & std::basic\_istream\< \_CharT, \_Traits \>::operator\>\> (double & \_\_f) \[inline\], \[inherited\]

*Floating point arithmetic extractors.*

**Parameters**

*\_\_f A variable of builtin floating point type.*

**Returns**

\*this *if successful*

*These functions use the stream's current locale (specifically, the* num\_get *facet) to parse the input data.*

### template\<typename \_CharT, typename \_Traits\> \_\_istream\_type & std::basic\_istream\< \_CharT, \_Traits \>::operator\>\> (float & \_\_f) \[inline\], \[inherited\]

*Floating point arithmetic extractors.*

**Parameters**

*\_\_f A variable of builtin floating point type.*

**Returns**

\*this *if successful*

*These functions use the stream's current locale (specifically, the* num\_get *facet) to parse the input data.*

### template\<typename \_CharT, typename \_Traits\> basic\_istream\< \_CharT, \_Traits \> & std::basic\_istream\< \_CharT, \_Traits \>::operator\>\> (int & \_\_n) \[inherited\]

*Integer arithmetic extractors.*

**Parameters**

*\_\_n A variable of builtin integral type.*

**Returns**

\*this *if successful*

*These functions use the stream's current locale (specifically, the* num\_get *facet) to parse the input data.*

### template\<typename \_CharT, typename \_Traits\> \_\_istream\_type & std::basic\_istream\< \_CharT, \_Traits \>::operator\>\> (ios\_base &(\* \_\_pf )(ios\_base &)) \[inline\], \[inherited\]

*Interface for manipulators. Manipulators such as* std::ws *and* std::dec *use these functions in constructs like* std::cin \>\> std::ws*. For more information, see the iomanip header.*

### template\<typename \_CharT, typename \_Traits\> \_\_istream\_type & std::basic\_istream\< \_CharT, \_Traits \>::operator\>\> (long & \_\_n) \[inline\], \[inherited\]

*Integer arithmetic extractors.*

**Parameters**

*\_\_n A variable of builtin integral type.*

**Returns**

\*this *if successful*

*These functions use the stream's current locale (specifically, the* num\_get *facet) to parse the input data.*

### template\<typename \_CharT, typename \_Traits\> \_\_istream\_type & std::basic\_istream\< \_CharT, \_Traits \>::operator\>\> (long double & \_\_f) \[inline\], \[inherited\]

*Floating point arithmetic extractors.*

**Parameters**

*\_\_f A variable of builtin floating point type.*

**Returns**

\*this *if successful*

*These functions use the stream's current locale (specifically, the* num\_get *facet) to parse the input data.*

### template\<typename \_CharT, typename \_Traits\> \_\_istream\_type & std::basic\_istream\< \_CharT, \_Traits \>::operator\>\> (long long & \_\_n) \[inline\], \[inherited\]

*Integer arithmetic extractors.*

**Parameters**

*\_\_n A variable of builtin integral type.*

**Returns**

\*this *if successful*

*These functions use the stream's current locale (specifically, the* num\_get *facet) to parse the input data.*

### template\<typename \_CharT, typename \_Traits\> basic\_istream\< \_CharT, \_Traits \> & std::basic\_istream\< \_CharT, \_Traits \>::operator\>\> (short & \_\_n) \[inherited\]

*Integer arithmetic extractors.*

**Parameters**

*\_\_n A variable of builtin integral type.*

**Returns**

\*this *if successful*

*These functions use the stream's current locale (specifically, the* num\_get *facet) to parse the input data.*

*References* **std::ios\_base::badbit***,* **std::ios\_base::failbit***,* **std::num\_get\< \_CharT, \_InIter \>::get()***,* **std::ios\_base::goodbit***,* **std::basic\_ios\< \_CharT, \_Traits \>::setstate()***, and* **std::use\_facet()***.*

### template\<typename \_CharT, typename \_Traits\> \_\_istream\_type & std::basic\_istream\< \_CharT, \_Traits \>::operator\>\> (unsigned int & \_\_n) \[inline\], \[inherited\]

*Integer arithmetic extractors.*

**Parameters**

*\_\_n A variable of builtin integral type.*

**Returns**

\*this *if successful*

*These functions use the stream's current locale (specifically, the* num\_get *facet) to parse the input data.*

### template\<typename \_CharT, typename \_Traits\> \_\_istream\_type & std::basic\_istream\< \_CharT, \_Traits \>::operator\>\> (unsigned long & \_\_n) \[inline\], \[inherited\]

*Integer arithmetic extractors.*

**Parameters**

*\_\_n A variable of builtin integral type.*

**Returns**

\*this *if successful*

*These functions use the stream's current locale (specifically, the* num\_get *facet) to parse the input data.*

### template\<typename \_CharT, typename \_Traits\> \_\_istream\_type & std::basic\_istream\< \_CharT, \_Traits \>::operator\>\> (unsigned long long & \_\_n) \[inline\], \[inherited\]

*Integer arithmetic extractors.*

**Parameters**

*\_\_n A variable of builtin integral type.*

**Returns**

\*this *if successful*

*These functions use the stream's current locale (specifically, the* num\_get *facet) to parse the input data.*

### template\<typename \_CharT, typename \_Traits\> \_\_istream\_type & std::basic\_istream\< \_CharT, \_Traits \>::operator\>\> (unsigned short & \_\_n) \[inline\], \[inherited\]

*Integer arithmetic extractors.*

**Parameters**

*\_\_n A variable of builtin integral type.*

**Returns**

\*this *if successful*

*These functions use the stream's current locale (specifically, the* num\_get *facet) to parse the input data.*

### template\<typename \_CharT, typename \_Traits\> \_\_istream\_type & std::basic\_istream\< \_CharT, \_Traits \>::operator\>\> (void \*& \_\_p) \[inline\], \[inherited\]

*Basic arithmetic extractors.*

**Parameters**

*\_\_p A variable of pointer type.*

**Returns**

\*this *if successful*

*These functions use the stream's current locale (specifically, the* num\_get *facet) to parse the input data.*

### template\<typename \_CharT, typename \_Traits\> basic\_istream\< \_CharT, \_Traits \>::int\_type std::basic\_istream\< \_CharT, \_Traits \>::peek (void ) \[inherited\]

*Looking ahead in the stream.*

**Returns**

*The next character, or eof().*

*If, after constructing the sentry object,* good() *is false, returns* traits::eof()*. Otherwise reads but does not extract the next input character.*

*References* **\_M\_gcount***,* **std::ios\_base::goodbit***, and* **std::basic\_ios\< \_CharT, \_Traits \>::rdbuf()***.*

### streamsize std::ios\_base::precision () const \[inline\], \[nodiscard\], \[inherited\]

*Flags access.*

**Returns**

*The precision to generate on certain output operations.*

*Be careful if you try to give a definition of precision here; see DR 189.*

*Referenced by* **std::basic\_ios\< \_CharT, \_Traits \>::copyfmt()***, and* **std::chrono::operator\<\<()***.*

### streamsize std::ios\_base::precision (streamsize \_\_prec) \[inline\], \[inherited\]

*Changing flags.*

**Parameters**

*\_\_prec The new precision value.*

**Returns**

*The previous value of precision().*

### template\<typename \_CharT, typename \_Traits\> basic\_ostream\< \_CharT, \_Traits \> & std::basic\_ostream\< \_CharT, \_Traits \>::put (char\_type \_\_c) \[inherited\]

*Simple insertion.*

**Parameters**

*\_\_c The character to insert.*

**Returns**

*\*this*

*Tries to insert* \_\_c*.*

**Note**

*This function is not overloaded on signed char and unsigned char.*

*References* **std::ios\_base::badbit***,* **std::ios\_base::goodbit***,* **std::basic\_ios\< \_CharT, \_Traits \>::rdbuf()***, and* **std::basic\_ios\< \_CharT, \_Traits \>::setstate()***.*

*Referenced by* **std::endl()***, and* **std::ends()***.*

### template\<typename \_CharT, typename \_Traits\> basic\_istream\< \_CharT, \_Traits \> & std::basic\_istream\< \_CharT, \_Traits \>::putback (char\_type \_\_c) \[inherited\]

*Unextracting a single character.*

**Parameters**

*\_\_c The character to push back into the input stream.*

**Returns**

*\*this*

*If* rdbuf() *is not null, calls* rdbuf()-\>sputbackc(c)*.*

*If* rdbuf() *is null or if* sputbackc() *fails, sets badbit in the error state.*

**Note**

*This function first clears eofbit. Since no characters are extracted, the next call to* gcount() *will return 0, as required by DR 60.*

*References* **\_M\_gcount***,* **std::ios\_base::badbit***,* **std::basic\_ios\< \_CharT, \_Traits \>::clear()***,* **std::ios\_base::eofbit***,* **std::ios\_base::goodbit***,* **std::basic\_ios\< \_CharT, \_Traits \>::rdbuf()***,* **std::basic\_ios\< \_CharT, \_Traits \>::rdstate()***,* **std::basic\_ios\< \_CharT, \_Traits \>::setstate()***, and* **std::basic\_streambuf\< \_CharT, \_Traits \>::sputbackc()***.*

*Referenced by* **std::operator\<\<()***.*

### void \*& std::ios\_base::pword (int \_\_ix) \[inline\], \[inherited\]

*Access to void pointer array.*

**Parameters**

*\_\_ix Index into the array.*

**Returns**

*A reference to a void\* associated with the index.*

*The pword function provides access to an array of pointers that can be used for any purpose. The array grows as required to hold the supplied index. All pointers in the array are initialized to 0.*

*The implementation reserves several indices. You should use xalloc to obtain an index that is safe to use. Also note that since the array can grow dynamically, it is not safe to hold onto the reference.*

### template\<typename \_CharT, typename \_Traits\> basic\_streambuf\< \_CharT, \_Traits \> \* std::basic\_ios\< \_CharT, \_Traits \>::rdbuf (basic\_streambuf\< \_CharT, \_Traits \> \* \_\_sb) \[inherited\]

*Changing the underlying buffer.*

**Parameters**

*\_\_sb The new stream buffer.*

**Returns**

*The previous stream buffer.*

*Associates a new buffer with the current stream, and clears the error state.*

*Due to historical accidents which the LWG refuses to correct, the I/O library suffers from a design error: this function is hidden in derived classes by overrides of the zero-argument* rdbuf()*, which is non-virtual for hysterical raisins. As a result, you must use explicit qualifications to access this function via any derived class. For example:*

```
std::fstream     foo;         // or some other derived type
std::streambuf*  p = .....;
foo.ios::rdbuf(p);            // ios == basic_ios<char>
```

*References* **clear()***.*

### template\<typename \_CharT, typename \_Traits, typename \_Alloc\> \_\_stringbuf\_type \* std::basic\_stringstream\< \_CharT, \_Traits, \_Alloc \>::rdbuf () const \[inline\], \[nodiscard\]

*Accessing the underlying buffer.*

**Returns**

*The current basic\_stringbuf buffer.*

*This hides both signatures of std::basic\_ios::rdbuf().*

### template\<typename \_CharT, typename \_Traits\> iostate std::basic\_ios\< \_CharT, \_Traits \>::rdstate () const \[inline\], \[nodiscard\], \[inherited\]

*Returns the error state of the stream buffer.*

**Returns**

*A bit pattern (well, isn't everything?)*

*See std::ios\_base::iostate for the possible bit values. Most users will call one of the interpreting wrappers, e.g., good().*

*Referenced by* **std::basic\_ios\< char\_type, traits\_type \>::bad()***,* **clear()***,* **std::basic\_ios\< char\_type, traits\_type \>::eof()***,* **std::basic\_ios\< char\_type, traits\_type \>::fail()***,* **std::basic\_ios\< char\_type, traits\_type \>::good()***,* **std::basic\_istream\< \_CharT, \_Traits \>::putback()***,* **std::basic\_istream\< \_CharT, \_Traits \>::seekg()***,* **std::basic\_istream\< \_CharT, \_Traits \>::seekg()***,* **std::basic\_ios\< char\_type, traits\_type \>::setstate()***, and* **std::basic\_istream\< \_CharT, \_Traits \>::unget()***.*

### template\<typename \_CharT, typename \_Traits\> basic\_istream\< \_CharT, \_Traits \> & std::basic\_istream\< \_CharT, \_Traits \>::read (char\_type \* \_\_s, streamsize \_\_n) \[inherited\]

*Extraction without delimiters.*

**Parameters**

*\_\_s A character array.* \
 *\_\_n Maximum number of characters to store.*

**Returns**

*\*this*

*If the stream state is* good()*, extracts characters and stores them into \_\_s until one of the following happens:*

- •

  *\_\_n characters are stored*

- •

  *the input sequence reaches end-of-file, in which case the error state is set to* failbit\|eofbit*.*

**Note**

*This function is not overloaded on signed char and unsigned char.*

*References* **\_M\_gcount***,* **std::ios\_base::badbit***,* **std::ios\_base::eofbit***,* **std::ios\_base::failbit***,* **std::ios\_base::goodbit***,* **std::basic\_ios\< \_CharT, \_Traits \>::rdbuf()***, and* **std::basic\_ios\< \_CharT, \_Traits \>::setstate()***.*

### template\<typename \_CharT, typename \_Traits\> streamsize std::basic\_istream\< \_CharT, \_Traits \>::readsome (char\_type \* \_\_s, streamsize \_\_n) \[inherited\]

*Extraction until the buffer is exhausted, but no more.*

**Parameters**

*\_\_s A character array.* \
 *\_\_n Maximum number of characters to store.*

**Returns**

*The number of characters extracted.*

*Extracts characters and stores them into \_\_s depending on the number of characters remaining in the streambuf's buffer,* rdbuf()-\>in\_avail()*, called* A *here:*

- •

  *if* A == -1*, sets eofbit and extracts no characters*

- •

  *if* A == 0*, extracts no characters*

- •

  *if* A \> 0*, extracts* min(A,n)

*The goal is to empty the current buffer, and to not request any more from the external input sequence controlled by the streambuf.*

*References* **\_M\_gcount***,* **std::ios\_base::badbit***,* **std::ios\_base::eofbit***,* **std::ios\_base::goodbit***,* **std::min()***,* **std::basic\_ios\< \_CharT, \_Traits \>::rdbuf()***, and* **std::basic\_ios\< \_CharT, \_Traits \>::setstate()***.*

### void std::ios\_base::register\_callback (event\_callback \_\_fn, int \_\_index) \[inherited\]

*Add the callback \_\_fn with parameter \_\_index.*

**Parameters**

*\_\_fn The function to add.* \
 *\_\_index The integer to pass to the function when invoked.*

*Registers a function as an event callback with an integer parameter to be passed to the function when invoked. Multiple copies of the function are allowed. If there are multiple callbacks, they are invoked in the order they were registered.*

### template\<typename \_CharT, typename \_Traits\> basic\_istream\< \_CharT, \_Traits \> & std::basic\_istream\< \_CharT, \_Traits \>::seekg (off\_type \_\_off, ios\_base::seekdir \_\_dir) \[inherited\]

*Changing the current read position.*

**Parameters**

*\_\_off A file offset object.* \
 *\_\_dir The direction in which to seek.*

**Returns**

*\*this*

*If* fail() *is not true, calls* rdbuf()-\>pubseekoff(\_\_off,\_\_dir)*. If that function fails, sets failbit.*

**Note**

*This function first clears eofbit. It does not count the number of characters extracted, if any, and therefore does not affect the next call to* gcount()*.*

*References* **std::ios\_base::badbit***,* **std::basic\_ios\< \_CharT, \_Traits \>::clear()***,* **std::ios\_base::eofbit***,* **std::basic\_ios\< \_CharT, \_Traits \>::fail()***,* **std::ios\_base::failbit***,* **std::ios\_base::goodbit***,* **std::ios\_base::in***,* **std::basic\_ios\< \_CharT, \_Traits \>::rdbuf()***,* **std::basic\_ios\< \_CharT, \_Traits \>::rdstate()***, and* **std::basic\_ios\< \_CharT, \_Traits \>::setstate()***.*

### template\<typename \_CharT, typename \_Traits\> basic\_istream\< \_CharT, \_Traits \> & std::basic\_istream\< \_CharT, \_Traits \>::seekg (pos\_type \_\_pos) \[inherited\]

*Changing the current read position.*

**Parameters**

*\_\_pos A file position object.*

**Returns**

*\*this*

*If* fail() *is not true, calls* rdbuf()-\>pubseekpos(\_\_pos)*. If that function fails, sets failbit.*

**Note**

*This function first clears eofbit. It does not count the number of characters extracted, if any, and therefore does not affect the next call to* gcount()*.*

*References* **std::ios\_base::badbit***,* **std::basic\_ios\< \_CharT, \_Traits \>::clear()***,* **std::ios\_base::eofbit***,* **std::basic\_ios\< \_CharT, \_Traits \>::fail()***,* **std::ios\_base::failbit***,* **std::ios\_base::goodbit***,* **std::ios\_base::in***,* **std::basic\_ios\< \_CharT, \_Traits \>::rdbuf()***,* **std::basic\_ios\< \_CharT, \_Traits \>::rdstate()***, and* **std::basic\_ios\< \_CharT, \_Traits \>::setstate()***.*

### template\<typename \_CharT, typename \_Traits\> basic\_ostream\< \_CharT, \_Traits \> & std::basic\_ostream\< \_CharT, \_Traits \>::seekp (off\_type \_\_off, ios\_base::seekdir \_\_dir) \[inherited\]

*Changing the current write position.*

**Parameters**

*\_\_off A file offset object.* \
 *\_\_dir The direction in which to seek.*

**Returns**

*\*this*

*If* fail() *is not true, calls* rdbuf()-\>pubseekoff(off,dir)*. If that function fails, sets failbit.*

*References* **std::basic\_ios\< \_CharT, \_Traits \>::fail()***,* **std::ios\_base::failbit***,* **std::ios\_base::out***,* **std::basic\_ios\< \_CharT, \_Traits \>::rdbuf()***, and* **std::basic\_ios\< \_CharT, \_Traits \>::setstate()***.*

### template\<typename \_CharT, typename \_Traits\> basic\_ostream\< \_CharT, \_Traits \> & std::basic\_ostream\< \_CharT, \_Traits \>::seekp (pos\_type \_\_pos) \[inherited\]

*Changing the current write position.*

**Parameters**

*\_\_pos A file position object.*

**Returns**

*\*this*

*If* fail() *is not true, calls* rdbuf()-\>pubseekpos(pos)*. If that function fails, sets failbit.*

*References* **std::basic\_ios\< \_CharT, \_Traits \>::fail()***,* **std::ios\_base::failbit***,* **std::ios\_base::out***,* **std::basic\_ios\< \_CharT, \_Traits \>::rdbuf()***, and* **std::basic\_ios\< \_CharT, \_Traits \>::setstate()***.*

### fmtflags std::ios\_base::setf (fmtflags \_\_fmtfl) \[inline\], \[inherited\]

*Setting new format flags.*

**Parameters**

*\_\_fmtfl Additional flags to set.*

**Returns**

*The previous format control flags.*

*This function sets additional flags in format control. Flags that were previously set remain set.*

*Referenced by* **std::\_\_detail::operator\>\>()***.*

### fmtflags std::ios\_base::setf (fmtflags \_\_fmtfl, fmtflags \_\_mask) \[inline\], \[inherited\]

*Setting new format flags.*

**Parameters**

*\_\_fmtfl Additional flags to set.* \
 *\_\_mask The flags mask for fmtfl.*

**Returns**

*The previous format control flags.*

*This function clears mask in the format flags, then sets fmtfl* & *mask. An example mask is* ios\_base::adjustfield*.*

### template\<typename \_CharT, typename \_Traits\> void std::basic\_ios\< \_CharT, \_Traits \>::setstate (iostate \_\_state) \[inline\], \[inherited\]

*Sets additional flags in the error state.*

**Parameters**

*\_\_state The additional state flag(s) to set.*

*See std::ios\_base::iostate for the possible bit values.*

*Referenced by* **std::basic\_ostream\< \_CharT, \_Traits \>::sentry::sentry()***,* **std::basic\_fstream\< char \>::close()***,* **std::basic\_ifstream\< char \>::close()***,* **std::basic\_ofstream\< char \>::close()***,* **std::basic\_ostream\< \_CharT, \_Traits \>::flush()***,* **std::basic\_istream\< \_CharT, \_Traits \>::get()***,* **std::basic\_istream\< \_CharT, \_Traits \>::get()***,* **std::getline()***,* **std::getline()***,* **std::basic\_fstream\< char \>::open()***,* **std::basic\_fstream\< char \>::open()***,* **std::basic\_ifstream\< char \>::open()***,* **std::basic\_ifstream\< char \>::open()***,* **std::basic\_ofstream\< char \>::open()***,* **std::basic\_ofstream\< char \>::open()***,* **std::basic\_ostream\< \_CharT, \_Traits \>::operator\<\<()***,* **std::operator\<\<()***,* **std::operator\<\<()***,* **std::basic\_istream\< \_CharT, \_Traits \>::operator\>\>()***,* **std::basic\_istream\< \_CharT, \_Traits \>::operator\>\>()***,* **std::operator\>\>()***,* **std::operator\>\>()***,* **std::operator\>\>()***,* **std::tr2::operator\>\>()***,* **std::basic\_ostream\< \_CharT, \_Traits \>::put()***,* **std::basic\_istream\< \_CharT, \_Traits \>::putback()***,* **std::basic\_istream\< \_CharT, \_Traits \>::read()***,* **std::basic\_istream\< \_CharT, \_Traits \>::readsome()***,* **std::basic\_istream\< \_CharT, \_Traits \>::seekg()***,* **std::basic\_istream\< \_CharT, \_Traits \>::seekg()***,* **std::basic\_ostream\< \_CharT, \_Traits \>::seekp()***,* **std::basic\_ostream\< \_CharT, \_Traits \>::seekp()***,* **std::basic\_istream\< \_CharT, \_Traits \>::sync()***, and* **std::ws()***.*

### template\<typename \_CharT, typename \_Traits, typename \_Alloc\> \_\_string\_type std::basic\_stringstream\< \_CharT, \_Traits, \_Alloc \>::str () const & \[inline\], \[nodiscard\]

*Copying out the string buffer.*

**Returns**

rdbuf()-\>str()

### template\<typename \_CharT, typename \_Traits, typename \_Alloc\> void std::basic\_stringstream\< \_CharT, \_Traits, \_Alloc \>::str (const \_\_string\_type & \_\_s) \[inline\]

*Setting a new buffer.*

**Parameters**

*\_\_s The string to use as a new sequence.*

*Calls* rdbuf()-\>str(s)*.*

### template\<typename \_CharT, typename \_Traits\> int std::basic\_istream\< \_CharT, \_Traits \>::sync (void ) \[inherited\]

*Synchronizing the stream buffer.*

**Returns**

*0 on success, -1 on failure*

*If* rdbuf() *is a null pointer, returns -1.*

*Otherwise, calls* rdbuf()-\>pubsync()*, and if that returns -1, sets badbit and returns -1.*

*Otherwise, returns 0.*

**Note**

*This function does not count the number of characters extracted, if any, and therefore does not affect the next call to* gcount()*.*

*References* **std::ios\_base::badbit***,* **std::ios\_base::goodbit***,* **std::basic\_streambuf\< \_CharT, \_Traits \>::pubsync()***,* **std::basic\_ios\< \_CharT, \_Traits \>::rdbuf()***, and* **std::basic\_ios\< \_CharT, \_Traits \>::setstate()***.*

### bool std::ios\_base::sync\_with\_stdio (bool \_\_sync = true) \[static\], \[inherited\]

*Interaction with the standard C I/O objects.*

**Parameters**

*\_\_sync Whether to synchronize or not.*

**Returns**

*True if the standard streams were previously synchronized.*

*The synchronization referred to is only that between the standard C facilities (e.g., stdout) and the standard C++ objects (e.g., cout). User-declared streams are unaffected. See https://gcc.gnu.org/onlinedocs/libstdc++/manual/fstreams.html#std.io.filestreams.binary*

### template\<typename \_CharT, typename \_Traits\> basic\_istream\< \_CharT, \_Traits \>::pos\_type std::basic\_istream\< \_CharT, \_Traits \>::tellg (void ) \[inherited\]

*Getting the current read position.*

**Returns**

*A file position object.*

*If* fail() *is not false, returns* pos\_type*(-1) to indicate failure. Otherwise returns* rdbuf()-\>pubseekoff(0,cur,in)*.*

**Note**

*This function does not count the number of characters extracted, if any, and therefore does not affect the next call to* gcount()*. At variance with putback, unget and seekg, eofbit is not cleared first.*

*References* **std::ios\_base::badbit***,* **std::ios\_base::cur***,* **std::basic\_ios\< \_CharT, \_Traits \>::fail()***,* **std::ios\_base::in***, and* **std::basic\_ios\< \_CharT, \_Traits \>::rdbuf()***.*

### template\<typename \_CharT, typename \_Traits\> basic\_ostream\< \_CharT, \_Traits \>::pos\_type std::basic\_ostream\< \_CharT, \_Traits \>::tellp () \[inherited\]

*Getting the current write position.*

**Returns**

*A file position object.*

*If* fail() *is not false, returns* pos\_type*(-1) to indicate failure. Otherwise returns* rdbuf()-\>pubseekoff(0,cur,out)*.*

*References* **std::ios\_base::cur***,* **std::basic\_ios\< \_CharT, \_Traits \>::fail()***,* **std::ios\_base::out***, and* **std::basic\_ios\< \_CharT, \_Traits \>::rdbuf()***.*

### template\<typename \_CharT, typename \_Traits\> basic\_ostream\< \_CharT, \_Traits \> \* std::basic\_ios\< \_CharT, \_Traits \>::tie () const \[inline\], \[nodiscard\], \[inherited\]

*Fetches the current tied stream.*

**Returns**

*A pointer to the tied stream, or NULL if the stream is not tied.*

*A stream may be tied (or synchronized) to a second output stream. When this stream performs any I/O, the tied stream is first flushed. For example,* std::cin *is tied to* std::cout*.*

*Referenced by* **std::basic\_ostream\< \_CharT, \_Traits \>::sentry::sentry()***, and* **copyfmt()***.*

### template\<typename \_CharT, typename \_Traits\> basic\_ostream\< \_CharT, \_Traits \> \* std::basic\_ios\< \_CharT, \_Traits \>::tie (basic\_ostream\< \_CharT, \_Traits \> \* \_\_tiestr) \[inline\], \[inherited\]

*Ties this stream to an output stream.*

**Parameters**

*\_\_tiestr The output stream.*

**Returns**

*The previously tied output stream, or NULL if the stream was not tied.*

*This sets up a new tie; see tie() for more.*

### template\<typename \_CharT, typename \_Traits\> basic\_istream\< \_CharT, \_Traits \> & std::basic\_istream\< \_CharT, \_Traits \>::unget (void ) \[inherited\]

*Unextracting the previous character.*

**Returns**

*\*this*

*If* rdbuf() *is not null, calls* rdbuf()-\>sungetc(c)*.*

*If* rdbuf() *is null or if* sungetc() *fails, sets badbit in the error state.*

**Note**

*This function first clears eofbit. Since no characters are extracted, the next call to* gcount() *will return 0, as required by DR 60.*

*References* **\_M\_gcount***,* **std::ios\_base::badbit***,* **std::basic\_ios\< \_CharT, \_Traits \>::clear()***,* **std::ios\_base::eofbit***,* **std::ios\_base::goodbit***,* **std::basic\_ios\< \_CharT, \_Traits \>::rdbuf()***,* **std::basic\_ios\< \_CharT, \_Traits \>::rdstate()***, and* **std::basic\_streambuf\< \_CharT, \_Traits \>::sungetc()***.*

*Referenced by* **std::\_\_detail::operator\>\>()***.*

### void std::ios\_base::unsetf (fmtflags \_\_mask) \[inline\], \[inherited\]

*Clearing format flags.*

**Parameters**

*\_\_mask The flags to unset.*

*This function clears \_\_mask in the format flags.*

### template\<typename \_CharT, typename \_Traits\> char\_type std::basic\_ios\< \_CharT, \_Traits \>::widen (char \_\_c) const \[inline\], \[inherited\]

*Widens characters.*

**Parameters**

*\_\_c The character to widen.*

**Returns**

*The widened character.*

*Maps a character of* char *to a character of* char\_type*.*

*Returns the result of*

```
std::use_facet<ctype<char_type> >(getloc()).widen(c)
```

*Additional l10n notes are at https://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.html*

*Referenced by* **std::endl()***,* **std::basic\_ios\< char\_type, traits\_type \>::fill()***,* **std::basic\_istream\< char\_type, traits\_type \>::get()***,* **std::basic\_istream\< char\_type, traits\_type \>::get()***,* **std::basic\_istream\< char\_type, traits\_type \>::getline()***,* **std::getline()***,* **std::getline()***,* **std::operator\<\<()***,* **std::operator\<\<()***,* **std::philox\_engine\< uint\_fast32\_t, 32, 4, 10, 0xCD9E8D57, 0x9E3779B9, 0xD2511F53, 0xBB67AE85 \>::operator\<\<***, and* **std::tr2::operator\>\>()***.*

### streamsize std::ios\_base::width () const \[inline\], \[nodiscard\], \[inherited\]

*Flags access.*

**Returns**

*The minimum field width to generate on output operations.*

*Minimum field width refers to the number of characters.*

*Referenced by* **std::basic\_ios\< \_CharT, \_Traits \>::copyfmt()***,* **std::num\_put\< \_CharT, \_OutIter \>::do\_put()***,* **std::operator\>\>()***, and* **std::operator\>\>()***.*

### streamsize std::ios\_base::width (streamsize \_\_wide) \[inline\], \[inherited\]

*Changing flags.*

**Parameters**

*\_\_wide The new width value.*

**Returns**

*The previous value of width().*

### template\<typename \_CharT, typename \_Traits\> basic\_ostream\< \_CharT, \_Traits \> & std::basic\_ostream\< \_CharT, \_Traits \>::write (const char\_type \* \_\_s, streamsize \_\_n) \[inherited\]

*Character string insertion.*

**Parameters**

*\_\_s The array to insert.* \
 *\_\_n Maximum number of characters to insert.*

**Returns**

*\*this*

*Characters are copied from* \_\_s *and inserted into the stream until one of the following happens:*

- •

  \_\_n *characters are inserted*

- •

  *inserting into the output sequence fails (in this case, badbit will be set in the stream's error state)*

**Note**

*This function is not overloaded on signed char and unsigned char.*

### int std::ios\_base::xalloc () \[static\], \[inherited\]

*Access to unique indices.*

**Returns**

*An integer different from all previous calls.*

*This function returns a unique integer every time it is called. It can be used for any purpose, but is primarily intended to be a unique index for the iword and pword functions. The expectation is that an application calls xalloc in order to obtain an index in the iword and pword arrays that can be used without fear of conflict.*

*The implementation maintains a static variable that is incremented and returned on each invocation. xalloc is guaranteed to return an index that is safe to use in the iword and pword arrays.*

## Member Data Documentation

### template\<typename \_CharT, typename \_Traits\> streamsize std::basic\_istream\< \_CharT, \_Traits \>::\_M\_gcount \[protected\], \[inherited\]

*The number of characters extracted in the previous unformatted function; see gcount().*

*Referenced by* **get()***,* **get()***,* **get()***,* **get()***,* **ignore()***,* **ignore()***,* **ignore()***,* **peek()***,* **putback()***,* **read()***,* **readsome()***, and* **unget()***.*

### const fmtflags std::ios\_base::adjustfield \[static\], \[inherited\]

*A mask of left\|right\|internal. Useful for the 2-arg form of* setf*.*

*Referenced by* **std::num\_put\< \_CharT, \_OutIter \>::do\_put()***,* **std::internal()***,* **std::left()***, and* **std::right()***.*

### const openmode std::ios\_base::app \[static\], \[inherited\]

*Seek to end before each write.*

*Referenced by* **std::basic\_filebuf\< char\_type, traits\_type \>::\_M\_set\_buffer()***,* **std::basic\_filebuf\< \_CharT, \_Traits \>::overflow()***, and* **std::basic\_filebuf\< \_CharT, \_Traits \>::xsputn()***.*

### const openmode std::ios\_base::ate \[static\], \[inherited\]

*Open and seek to end immediately after opening.*

*Referenced by* **std::basic\_filebuf\< \_CharT, \_Traits \>::open()***.*

### const iostate std::ios\_base::badbit \[static\], \[inherited\]

*Indicates a loss of integrity in an input or output sequence (such as an irrecoverable read error from a file).*

*Referenced by* **std::basic\_istream\< \_CharT, \_Traits \>::sentry::sentry()***,* **std::basic\_ostream\< \_CharT, \_Traits \>::sentry::~sentry()***,* **std::basic\_ios\< \_CharT, \_Traits \>::clear()***,* **std::basic\_ostream\< \_CharT, \_Traits \>::flush()***,* **std::basic\_iostream\< char\_type, traits\_type \>::get()***,* **std::basic\_istream\< \_CharT, \_Traits \>::get()***,* **std::basic\_istream\< \_CharT, \_Traits \>::get()***,* **std::basic\_iostream\< char\_type, traits\_type \>::operator\<\<()***,* **std::basic\_ostream\< \_CharT, \_Traits \>::operator\<\<()***,* **std::basic\_istream\< \_CharT, \_Traits \>::operator\>\>()***,* **std::operator\>\>()***,* **std::basic\_ostream\< \_CharT, \_Traits \>::put()***,* **std::basic\_istream\< \_CharT, \_Traits \>::putback()***,* **std::basic\_istream\< \_CharT, \_Traits \>::read()***,* **std::basic\_istream\< \_CharT, char\_traits\< \_CharT \> \>::read()***,* **std::basic\_istream\< \_CharT, \_Traits \>::readsome()***,* **std::basic\_istream\< \_CharT, \_Traits \>::seekg()***,* **std::basic\_istream\< \_CharT, \_Traits \>::seekg()***,* **std::basic\_istream\< \_CharT, \_Traits \>::sync()***,* **std::basic\_istream\< \_CharT, \_Traits \>::tellg()***,* **std::basic\_istream\< \_CharT, \_Traits \>::unget()***, and* **std::ws()***.*

### const fmtflags std::ios\_base::basefield \[static\], \[inherited\]

*A mask of dec\|oct\|hex. Useful for the 2-arg form of* setf*.*

*Referenced by* **std::dec()***,* **std::num\_get\< \_CharT, \_InIter \>::do\_get()***,* **std::num\_put\< \_CharT, \_OutIter \>::do\_put()***,* **std::hex()***, and* **std::oct()***.*

### const seekdir std::ios\_base::beg \[static\], \[inherited\]

*Request a seek relative to the beginning of the stream.*

*Referenced by* **std::basic\_filebuf\< \_CharT, \_Traits \>::seekpos()***.*

### const openmode std::ios\_base::binary \[static\], \[inherited\]

*Perform input and output in binary mode (as opposed to text mode). This is probably not what you think it is; see https://gcc.gnu.org/onlinedocs/libstdc++/manual/fstreams.html#std.io.filestreams.binary.*

*Referenced by* **std::basic\_filebuf\< \_CharT, \_Traits \>::showmanyc()***.*

### const fmtflags std::ios\_base::boolalpha \[static\], \[inherited\]

*Insert/extract* bool *in alphabetic rather than numeric format.*

*Referenced by* **std::boolalpha()***,* **std::num\_get\< \_CharT, \_InIter \>::do\_get()***,* **std::num\_put\< \_CharT, \_OutIter \>::do\_put()***, and* **std::noboolalpha()***.*

### const seekdir std::ios\_base::cur \[static\], \[inherited\]

*Request a seek relative to the current position within the sequence.*

*Referenced by* **std::basic\_filebuf\< \_CharT, \_Traits \>::imbue()***,* **std::basic\_filebuf\< \_CharT, \_Traits \>::overflow()***,* **std::basic\_filebuf\< \_CharT, \_Traits \>::pbackfail()***,* **std::basic\_filebuf\< \_CharT, \_Traits \>::seekoff()***,* **std::basic\_stringbuf\< \_CharT, \_Traits, \_Alloc \>::seekoff()***,* **std::basic\_istream\< \_CharT, \_Traits \>::tellg()***, and* **std::basic\_ostream\< \_CharT, \_Traits \>::tellp()***.*

### const fmtflags std::ios\_base::dec \[static\], \[inherited\]

*Converts integer input or generates integer output in decimal base.*

*Referenced by* **std::dec()***,* **std::philox\_engine\< uint\_fast32\_t, 32, 4, 10, 0xCD9E8D57, 0x9E3779B9, 0xD2511F53, 0xBB67AE85 \>::operator\<\<***, and* **std::philox\_engine\< uint\_fast32\_t, 32, 4, 10, 0xCD9E8D57, 0x9E3779B9, 0xD2511F53, 0xBB67AE85 \>::operator\>\>***.*

### const seekdir std::ios\_base::end \[static\], \[inherited\]

*Request a seek relative to the current end of the sequence.*

*Referenced by* **std::basic\_filebuf\< \_CharT, \_Traits \>::open()***, and* **std::basic\_stringbuf\< \_CharT, \_Traits, \_Alloc \>::seekoff()***.*

### const iostate std::ios\_base::eofbit \[static\], \[inherited\]

*Indicates that an input operation reached the end of an input sequence.*

*Referenced by* **std::num\_get\< \_CharT, \_InIter \>::do\_get()***,* **std::num\_get\< \_CharT, \_InIter \>::do\_get()***,* **std::num\_get\< \_CharT, \_InIter \>::do\_get()***,* **std::num\_get\< \_CharT, \_InIter \>::do\_get()***,* **std::time\_get\< \_CharT, \_InIter \>::do\_get()***,* **std::time\_get\< \_CharT, \_InIter \>::do\_get\_date()***,* **std::time\_get\< \_CharT, \_InIter \>::do\_get\_monthname()***,* **std::time\_get\< \_CharT, \_InIter \>::do\_get\_time()***,* **std::time\_get\< \_CharT, \_InIter \>::do\_get\_weekday()***,* **std::time\_get\< \_CharT, \_InIter \>::do\_get\_year()***,* **std::basic\_istream\< \_CharT, \_Traits \>::get()***,* **std::basic\_istream\< \_CharT, \_Traits \>::get()***,* **std::time\_get\< \_CharT, \_InIter \>::get()***,* **std::basic\_istream\< \_CharT, \_Traits \>::ignore()***,* **std::basic\_istream\< \_CharT, \_Traits \>::operator\>\>()***,* **std::operator\>\>()***,* **std::basic\_istream\< \_CharT, char\_traits\< \_CharT \> \>::peek()***,* **std::basic\_istream\< \_CharT, \_Traits \>::putback()***,* **std::basic\_istream\< \_CharT, \_Traits \>::read()***,* **std::basic\_istream\< \_CharT, \_Traits \>::readsome()***,* **std::basic\_istream\< \_CharT, \_Traits \>::seekg()***,* **std::basic\_istream\< \_CharT, \_Traits \>::seekg()***,* **std::basic\_istream\< \_CharT, char\_traits\< \_CharT \> \>::seekg()***,* **std::basic\_istream\< \_CharT, \_Traits \>::unget()***,* **std::basic\_istream\< \_CharT, char\_traits\< \_CharT \> \>::unget()***, and* **std::ws()***.*

### const iostate std::ios\_base::failbit \[static\], \[inherited\]

*Indicates that an input operation failed to read the expected characters, or that an output operation failed to generate the desired characters.*

*Referenced by* **std::basic\_ostream\< \_CharT, \_Traits \>::sentry::sentry()***,* **std::basic\_fstream\< char \>::close()***,* **std::basic\_ifstream\< char \>::close()***,* **std::basic\_ofstream\< char \>::close()***,* **std::num\_get\< \_CharT, \_InIter \>::do\_get()***,* **std::time\_get\< \_CharT, \_InIter \>::do\_get\_monthname()***,* **std::time\_get\< \_CharT, \_InIter \>::do\_get\_weekday()***,* **std::time\_get\< \_CharT, \_InIter \>::do\_get\_year()***,* **std::basic\_istream\< \_CharT, \_Traits \>::get()***,* **std::basic\_istream\< \_CharT, \_Traits \>::get()***,* **std::time\_get\< \_CharT, \_InIter \>::get()***,* **std::basic\_fstream\< char \>::open()***,* **std::basic\_fstream\< char \>::open()***,* **std::basic\_ifstream\< char \>::open()***,* **std::basic\_ifstream\< char \>::open()***,* **std::basic\_ofstream\< char \>::open()***,* **std::basic\_ofstream\< char \>::open()***,* **std::operator\<\<()***,* **std::basic\_iostream\< char\_type, traits\_type \>::operator\>\>()***,* **std::basic\_istream\< \_CharT, \_Traits \>::operator\>\>()***,* **std::basic\_istream\< \_CharT, \_Traits \>::operator\>\>()***,* **std::operator\>\>()***,* **std::basic\_istream\< \_CharT, \_Traits \>::read()***,* **std::basic\_istream\< \_CharT, \_Traits \>::seekg()***,* **std::basic\_istream\< \_CharT, \_Traits \>::seekg()***,* **std::basic\_ostream\< \_CharT, \_Traits \>::seekp()***, and* **std::basic\_ostream\< \_CharT, \_Traits \>::seekp()***.*

### const fmtflags std::ios\_base::fixed \[static\], \[inherited\]

*Generate floating-point output in fixed-point notation.*

*Referenced by* **std::fixed()***, and* **std::hexfloat()***.*

### const fmtflags std::ios\_base::floatfield \[static\], \[inherited\]

*A mask of scientific\|fixed. Useful for the 2-arg form of* setf*.*

*Referenced by* **std::defaultfloat()***,* **std::fixed()***,* **std::hexfloat()***, and* **std::scientific()***.*

### const iostate std::ios\_base::goodbit \[static\], \[inherited\]

*Indicates all is well.*

*Referenced by* **std::basic\_istream\< \_CharT, \_Traits \>::sentry::sentry()***,* **std::num\_get\< \_CharT, \_InIter \>::do\_get()***,* **std::time\_get\< \_CharT, \_InIter \>::do\_get()***,* **std::time\_get\< \_CharT, \_InIter \>::do\_get\_monthname()***,* **std::time\_get\< \_CharT, \_InIter \>::do\_get\_weekday()***,* **std::time\_get\< \_CharT, \_InIter \>::do\_get\_year()***,* **std::basic\_ostream\< \_CharT, \_Traits \>::flush()***,* **std::basic\_iostream\< char\_type, traits\_type \>::get()***,* **std::basic\_istream\< \_CharT, \_Traits \>::get()***,* **std::basic\_istream\< \_CharT, \_Traits \>::get()***,* **std::basic\_istream\< \_CharT, \_Traits \>::get()***,* **std::basic\_istream\< \_CharT, \_Traits \>::get()***,* **std::time\_get\< \_CharT, \_InIter \>::get()***,* **std::basic\_istream\< \_CharT, \_Traits \>::ignore()***,* **std::basic\_istream\< \_CharT, \_Traits \>::ignore()***,* **std::basic\_istream\< \_CharT, \_Traits \>::ignore()***,* **std::basic\_iostream\< char\_type, traits\_type \>::operator\<\<()***,* **std::basic\_ostream\< \_CharT, \_Traits \>::operator\<\<()***,* **std::basic\_iostream\< char\_type, traits\_type \>::operator\>\>()***,* **std::basic\_istream\< \_CharT, \_Traits \>::operator\>\>()***,* **std::basic\_istream\< \_CharT, \_Traits \>::operator\>\>()***,* **std::operator\>\>()***,* **std::basic\_istream\< \_CharT, \_Traits \>::peek()***,* **std::basic\_ostream\< \_CharT, \_Traits \>::put()***,* **std::basic\_istream\< \_CharT, \_Traits \>::putback()***,* **std::basic\_istream\< \_CharT, \_Traits \>::read()***,* **std::basic\_istream\< \_CharT, \_Traits \>::readsome()***,* **std::basic\_istream\< \_CharT, \_Traits \>::seekg()***,* **std::basic\_istream\< \_CharT, \_Traits \>::seekg()***,* **std::basic\_istream\< \_CharT, \_Traits \>::sync()***,* **std::basic\_istream\< \_CharT, \_Traits \>::unget()***, and* **std::ws()***.*

### const fmtflags std::ios\_base::hex \[static\], \[inherited\]

*Converts integer input or generates integer output in hexadecimal base.*

*Referenced by* **std::num\_get\< \_CharT, \_InIter \>::do\_get()***,* **std::num\_put\< \_CharT, \_OutIter \>::do\_put()***, and* **std::hex()***.*

### const openmode std::ios\_base::in \[static\], \[inherited\]

*Open for input. Default for* ifstream *and fstream.*

*Referenced by* **std::basic\_fstream\< char \>::basic\_fstream()***,* **std::basic\_fstream\< char \>::basic\_fstream()***,* **std::basic\_fstream\< char \>::basic\_fstream()***,* **std::basic\_ifstream\< char \>::basic\_ifstream()***,* **std::basic\_ifstream\< char \>::basic\_ifstream()***,* **std::basic\_ifstream\< char \>::basic\_ifstream()***,* **std::basic\_istringstream\< char \>::basic\_istringstream()***,* **std::basic\_stringbuf\< char \>::basic\_stringbuf()***,* **std::basic\_stringstream\< char \>::basic\_stringstream()***,* **std::basic\_filebuf\< char\_type, traits\_type \>::\_M\_set\_buffer()***,* **std::basic\_fstream\< char \>::open()***,* **std::basic\_fstream\< char \>::open()***,* **std::basic\_fstream\< char \>::open()***,* **std::basic\_ifstream\< char \>::open()***,* **std::basic\_ifstream\< char \>::open()***,* **std::basic\_ifstream\< char \>::open()***,* **std::basic\_stringbuf\< \_CharT, \_Traits, \_Alloc \>::overflow()***,* **std::basic\_filebuf\< \_CharT, \_Traits \>::pbackfail()***,* **std::basic\_streambuf\< char\_type, traits\_type \>::pubseekoff()***,* **std::basic\_streambuf\< char\_type, traits\_type \>::pubseekpos()***,* **std::basic\_istream\< \_CharT, \_Traits \>::seekg()***,* **std::basic\_istream\< \_CharT, \_Traits \>::seekg()***,* **std::basic\_streambuf\< char\_type, traits\_type \>::seekoff()***,* **std::basic\_stringbuf\< \_CharT, \_Traits, \_Alloc \>::seekoff()***,* **std::basic\_stringbuf\< char \>::seekoff()***,* **std::basic\_streambuf\< char\_type, traits\_type \>::seekpos()***,* **std::basic\_stringbuf\< \_CharT, \_Traits, \_Alloc \>::seekpos()***,* **std::basic\_stringbuf\< char \>::seekpos()***,* **std::basic\_filebuf\< \_CharT, \_Traits \>::showmanyc()***,* **std::basic\_stringbuf\< char \>::showmanyc()***,* **std::basic\_istream\< \_CharT, \_Traits \>::tellg()***,* **std::basic\_filebuf\< \_CharT, \_Traits \>::underflow()***,* **std::basic\_stringbuf\< \_CharT, \_Traits, \_Alloc \>::underflow()***, and* **std::basic\_filebuf\< \_CharT, \_Traits \>::xsgetn()***.*

### const fmtflags std::ios\_base::internal \[static\], \[inherited\]

*Adds fill characters at a designated internal point in certain generated output, or identical to* right *if no such point is designated.*

*Referenced by* **std::internal()***.*

### const fmtflags std::ios\_base::left \[static\], \[inherited\]

*Adds fill characters on the right (final positions) of certain generated output. (I.e., the thing you print is flush left.).*

*Referenced by* **std::num\_put\< \_CharT, \_OutIter \>::do\_put()***,* **std::left()***, and* **std::philox\_engine\< uint\_fast32\_t, 32, 4, 10, 0xCD9E8D57, 0x9E3779B9, 0xD2511F53, 0xBB67AE85 \>::operator\<\<***.*

### const fmtflags std::ios\_base::oct \[static\], \[inherited\]

*Converts integer input or generates integer output in octal base.*

*Referenced by* **std::oct()***.*

### const openmode std::ios\_base::out \[static\], \[inherited\]

*Open for output. Default for* ofstream *and fstream.*

*Referenced by* **std::basic\_fstream\< char \>::basic\_fstream()***,* **std::basic\_fstream\< char \>::basic\_fstream()***,* **std::basic\_fstream\< char \>::basic\_fstream()***,* **std::basic\_ofstream\< char \>::basic\_ofstream()***,* **std::basic\_ofstream\< char \>::basic\_ofstream()***,* **std::basic\_ofstream\< char \>::basic\_ofstream()***,* **std::basic\_ostringstream\< char \>::basic\_ostringstream()***,* **std::basic\_stringbuf\< char \>::basic\_stringbuf()***,* **std::basic\_stringstream\< char \>::basic\_stringstream()***,* **std::basic\_filebuf\< char\_type, traits\_type \>::\_M\_set\_buffer()***,* **std::basic\_fstream\< char \>::open()***,* **std::basic\_fstream\< char \>::open()***,* **std::basic\_fstream\< char \>::open()***,* **std::basic\_ofstream\< char \>::open()***,* **std::basic\_ofstream\< char \>::open()***,* **std::basic\_ofstream\< char \>::open()***,* **std::basic\_filebuf\< \_CharT, \_Traits \>::overflow()***,* **std::basic\_stringbuf\< \_CharT, \_Traits, \_Alloc \>::overflow()***,* **std::basic\_stringbuf\< \_CharT, \_Traits, \_Alloc \>::pbackfail()***,* **std::basic\_streambuf\< char\_type, traits\_type \>::pubseekoff()***,* **std::basic\_streambuf\< char\_type, traits\_type \>::pubseekpos()***,* **std::basic\_streambuf\< char\_type, traits\_type \>::seekoff()***,* **std::basic\_stringbuf\< \_CharT, \_Traits, \_Alloc \>::seekoff()***,* **std::basic\_stringbuf\< char \>::seekoff()***,* **std::basic\_ostream\< \_CharT, \_Traits \>::seekp()***,* **std::basic\_ostream\< \_CharT, \_Traits \>::seekp()***,* **std::basic\_streambuf\< char\_type, traits\_type \>::seekpos()***,* **std::basic\_stringbuf\< \_CharT, \_Traits, \_Alloc \>::seekpos()***,* **std::basic\_stringbuf\< char \>::seekpos()***,* **std::basic\_ostream\< \_CharT, \_Traits \>::tellp()***, and* **std::basic\_filebuf\< \_CharT, \_Traits \>::xsputn()***.*

### const fmtflags std::ios\_base::right \[static\], \[inherited\]

*Adds fill characters on the left (initial positions) of certain generated output. (I.e., the thing you print is flush right.).*

*Referenced by* **std::right()***.*

### const fmtflags std::ios\_base::scientific \[static\], \[inherited\]

*Generates floating-point output in scientific notation.*

*Referenced by* **std::hexfloat()***, and* **std::scientific()***.*

### const fmtflags std::ios\_base::showbase \[static\], \[inherited\]

*Generates a prefix indicating the numeric base of generated integer output.*

*Referenced by* **std::num\_put\< \_CharT, \_OutIter \>::do\_put()***,* **std::noshowbase()***, and* **std::showbase()***.*

### const fmtflags std::ios\_base::showpoint \[static\], \[inherited\]

*Generates a decimal-point character unconditionally in generated floating-point output.*

*Referenced by* **std::noshowpoint()***, and* **std::showpoint()***.*

### const fmtflags std::ios\_base::showpos \[static\], \[inherited\]

*Generates a + sign in non-negative generated numeric output.*

*Referenced by* **std::noshowpos()***, and* **std::showpos()***.*

### const fmtflags std::ios\_base::skipws \[static\], \[inherited\]

*Skips leading white space before certain input operations.*

*Referenced by* **std::noskipws()***,* **std::\_\_detail::operator\>\>()***,* **std::philox\_engine\< uint\_fast32\_t, 32, 4, 10, 0xCD9E8D57, 0x9E3779B9, 0xD2511F53, 0xBB67AE85 \>::operator\>\>***, and* **std::skipws()***.*

### const openmode std::ios\_base::trunc \[static\], \[inherited\]

*Truncate an existing stream when opening. Default for* ofstream*.*

### const fmtflags std::ios\_base::unitbuf \[static\], \[inherited\]

*Flushes output after each output operation.*

*Referenced by* **std::basic\_ostream\< \_CharT, \_Traits \>::sentry::~sentry()***,* **std::nounitbuf()***, and* **std::unitbuf()***.*

### const fmtflags std::ios\_base::uppercase \[static\], \[inherited\]

*Replaces certain lowercase letters with their uppercase equivalents in generated output.*

*Referenced by* **std::num\_put\< \_CharT, \_OutIter \>::do\_put()***,* **std::nouppercase()***, and* **std::uppercase()***.*

## Author

*Generated automatically by Doxygen for libstdc++ from the source code.*
