---
name: "std::basic_istringstream"
section: "3cxx"
platform: "linux"
package: "libstdc++-12-doc"
version: "12.4.0-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/std::basic_istringstream/3cxx"
---

# std::basic\_istringstream(3cxx)

Controlling input for std::string.

## NAME

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

## SYNOPSIS

`#include <sstream>`

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

### Public Types

**typedef** **ctype**\< \_CharT \> **\_\_ctype\_type**\
 **typedef** **basic\_ios**\< \_CharT, \_Traits \> **\_\_ios\_type**\
 **typedef** **basic\_istream**\< char\_type, traits\_type \> **\_\_istream\_type**\
 **typedef** **num\_get**\< \_CharT, **istreambuf\_iterator**\< \_CharT, \_Traits \> \> **\_\_num\_get\_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**\

**typedef** **num\_put**\< \_CharT, **ostreambuf\_iterator**\< \_CharT, \_Traits \> \> **\_\_num\_put\_type**\

### Public Member Functions

**basic\_istringstream** ()\
 Default constructor starts with an empty string buffer.  **basic\_istringstream** (**basic\_istringstream** &&**\_\_rhs**)\
 **basic\_istringstream** (const **\_\_string\_type** &**\_\_str**, **ios\_base::openmode** **\_\_mode**=**ios\_base::in**)\
 Starts with an existing string buffer.  **basic\_istringstream** (const **basic\_istringstream** &)=**delete**\
 **basic\_istringstream** (**ios\_base::openmode** **\_\_mode**)\
 Starts with an empty string buffer.  **~basic\_istringstream** ()\
 The destructor does nothing.  template\<**typename** **\_ValueT** \> **basic\_istream**\< \_CharT, \_Traits \> & **\_M\_extract** (**\_ValueT** &**\_\_v**)\
 const **locale** & **\_M\_getloc** () const\
 Locale access.  **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.  **streamsize** **gcount** () const\
 Character counting.  **basic\_istream**\< char \> & **getline** (char\_type \***\_\_s**, **streamsize** \_\_n, char\_type **\_\_delim**)\
 Explicit specialization declarations, defined in src/istream.cc.  **basic\_istream**\< wchar\_t \> & **getline** (char\_type \***\_\_s**, **streamsize** \_\_n, char\_type **\_\_delim**)\
 **locale** **getloc** () const\
 Locale access.  bool **good** () const\
 Fast error checking.  **basic\_istream**\< char \> & **ignore** (**streamsize** \_\_n)\
 **basic\_istream**\< wchar\_t \> & **ignore** (**streamsize** \_\_n)\
 **basic\_istream**\< char \> & **ignore** (**streamsize** \_\_n, int\_type **\_\_delim**)\
 **basic\_istream**\< wchar\_t \> & **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.  **basic\_istringstream** & **operator=** (**basic\_istringstream** &&**\_\_rhs**)\
 **basic\_istringstream** & **operator=** (const **basic\_istringstream** &)=**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.  \_\_stringbuf\_type \* **rdbuf** () const\
 Accessing the underlying buffer.  **basic\_streambuf**\< \_CharT, \_Traits \> \* **rdbuf** (**basic\_streambuf**\< \_CharT, \_Traits \> \***\_\_sb**)\
 Changing 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.  **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** () const\
 Copying out the string buffer.  **void** **str** (const **\_\_string\_type** &**\_\_s**)\
 Setting a new buffer.  **void** **swap** (**basic\_istringstream** &**\_\_rhs**)\
 **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.  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.

### 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** ()\
 **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\_istream** &**\_\_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\_istringstream\< \_CharT, \_Traits, \_Alloc \>"Controlling input 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 objects of type std::basic\_string, using the inherited functions from std::basic\_istream. To control the associated sequence, an instance of std::basic\_stringbuf is used, which this page refers to as `sb`.

## Member Typedef Documentation

### template\<typename \_CharT , typename \_Traits \> typedef num\_put\<\_CharT, ostreambuf\_iterator\<\_CharT, \_Traits\> \> std::basic\_ios\< \_CharT, \_Traits \>::\_\_num\_put\_type` [inherited]`

These are non-standard types.

### 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\_istringstream\< \_CharT, \_Traits, \_Alloc \>::basic\_istringstream ()` [inline]`

*Default constructor starts with an empty string buffer. Initializes* `sb` *using* `in`*, 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\_istringstream\< \_CharT, \_Traits, \_Alloc \>::basic\_istringstream (ios\_base::openmode \_\_mode)` [inline]`, ` [explicit]`

*Starts with an empty string buffer.*

**Parameters**

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

`ios_base::in` *is automatically included in \_\_mode.*

*Initializes* `sb` *using* `__mode|in`*, 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\_istringstream\< \_CharT, \_Traits, \_Alloc \>::basic\_istringstream (const \_\_string\_type & \_\_str, ios\_base::openmode \_\_mode = ios\_base::in)` [inline]`, ` [explicit]`

*Starts with an existing string buffer.*

**Parameters**

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

`ios_base::in` *is automatically included in mode.*

*Initializes* `sb` *using str and* `mode|in`*, 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\_istringstream\< \_CharT, \_Traits, \_Alloc \>::~basic\_istringstream ()` [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.*

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

*Fast error checking.*

**Returns**

*True if the badbit is set.*

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

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

### 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.*

*Referenced by* **std::basic\_ios\< \_CharT, \_Traits \>::exceptions()***,* **std::basic\_istream\< \_CharT, \_Traits \>::putback()***,* **std::basic\_istream\< \_CharT, \_Traits \>::seekg()***,* **std::basic\_istream\< \_CharT, \_Traits \>::seekg()***,* **std::basic\_ios\< \_CharT, \_Traits \>::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* **std::\_\_addressof()***,* **std::basic\_ios\< \_CharT, \_Traits \>::tie()***, and* **std::tie()***.*

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

*Fast error checking.*

**Returns**

*True if the eofbit is set.*

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

*References* **std::ios\_base::eofbit***, and* **std::basic\_ios\< \_CharT, \_Traits \>::rdstate()***.*

### template\<typename \_CharT , typename \_Traits \> iostate std::basic\_ios\< \_CharT, \_Traits \>::exceptions () const` [inline]`, ` [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.*

### 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);
}
```

*References* **std::basic\_ios\< \_CharT, \_Traits \>::clear()***.*

### template\<typename \_CharT , typename \_Traits \> bool std::basic\_ios\< \_CharT, \_Traits \>::fail () const` [inline]`, ` [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.*

*References* **std::ios\_base::badbit***,* **std::ios\_base::failbit***, and* **std::basic\_ios\< \_CharT, \_Traits \>::rdstate()***.*

*Referenced by* **std::basic\_ios\< \_CharT, \_Traits \>::operator bool()***,* **std::basic\_ios\< \_CharT, \_Traits \>::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]`, ` [inherited]`

*Retrieves the empty character.*

**Returns**

*The current fill character.*

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

*References* **std::basic\_ios\< \_CharT, \_Traits \>::widen()***.*

*Referenced by* **std::basic\_ios\< \_CharT, \_Traits \>::fill()***.*

### 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.*

*References* **std::basic\_ios\< \_CharT, \_Traits \>::fill()***.*

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

*Access to format flags.*

**Returns**

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

### 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 \> 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* **std::basic\_istream\< \_CharT, \_Traits \>::\_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 (\_\_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* **std::basic\_istream\< \_CharT, \_Traits \>::\_M\_gcount***,* **std::ios\_base::eofbit***,* **std::ios\_base::goodbit***, and* **std::basic\_ios\< \_CharT, \_Traits \>::rdbuf()***.*

### 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* **std::basic\_istream\< \_CharT, \_Traits \>::\_M\_gcount***, and* **std::ios\_base::goodbit***.*

### 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* **std::basic\_istream\< \_CharT, \_Traits \>::\_M\_gcount***, and* **std::ios\_base::goodbit***.*

### 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')).*

### 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.*

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

### 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.*

### locale std::ios\_base::getloc () const` [inline]`, ` [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.*

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

*Fast error checking.*

**Returns**

*True if no error flags are set.*

*A wrapper around rdstate.*

*References* **std::basic\_ios\< \_CharT, \_Traits \>::rdstate()***.*

### 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* **std::basic\_istream\< \_CharT, \_Traits \>::\_M\_gcount***,* **std::ios\_base::goodbit***, and* **std::basic\_ios\< \_CharT, \_Traits \>::rdbuf()***.*

### 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* **std::basic\_istream\< \_CharT, \_Traits \>::\_M\_gcount***,* **std::ios\_base::goodbit***, and* **std::basic\_ios\< \_CharT, \_Traits \>::rdbuf()***.*

### 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 three 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* **std::basic\_istream\< \_CharT, \_Traits \>::\_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 http://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.html*

*References* **std::ios\_base::imbue()***.*

### 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\_ios\< \_CharT, \_Traits \>::basic\_ios()***.*

### 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.*

### 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 http://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.html*

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

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

*References* **std::basic\_ios\< \_CharT, \_Traits \>::fail()***.*

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

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

*References* **std::basic\_ios\< \_CharT, \_Traits \>::fail()***.*

### template\<typename \_CharT , typename \_Traits \> \_\_istream\_type & std::basic\_istream\< \_CharT, \_Traits \>::operator\>\> (\_\_ios\_type &(\*)(\_\_ios\_type &) \_\_pf)` [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 &(\*)(\_\_istream\_type &) \_\_pf)` [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 &(\*)(ios\_base &) \_\_pf)` [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::ios\_base::goodbit***, and* **std::basic\_ios\< \_CharT, \_Traits \>::setstate()***.*

### 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* **std::basic\_istream\< \_CharT, \_Traits \>::\_M\_gcount***,* **std::ios\_base::badbit***,* **std::ios\_base::eofbit***,* **std::ios\_base::goodbit***,* **std::basic\_ios\< \_CharT, \_Traits \>::rdbuf()***, and* **std::basic\_ios\< \_CharT, \_Traits \>::setstate()***.*

### streamsize std::ios\_base::precision () const` [inline]`, ` [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.*

### 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\_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* **std::basic\_istream\< \_CharT, \_Traits \>::\_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\_ios\< \_CharT, \_Traits \>::setstate()***.*

### 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 , typename \_Alloc \> \_\_stringbuf\_type \* std::basic\_istringstream\< \_CharT, \_Traits, \_Alloc \>::rdbuf () const` [inline]`

*Accessing the underlying buffer.*

**Returns**

*The current basic\_stringbuf buffer.*

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

### 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>
```

### template\<typename \_CharT , typename \_Traits \> iostate std::basic\_ios\< \_CharT, \_Traits \>::rdstate () const` [inline]`, ` [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\< \_CharT, \_Traits \>::bad()***,* **std::basic\_ios\< \_CharT, \_Traits \>::eof()***,* **std::basic\_ios\< \_CharT, \_Traits \>::fail()***,* **std::basic\_ios\< \_CharT, \_Traits \>::good()***,* **std::basic\_istream\< \_CharT, \_Traits \>::putback()***,* **std::basic\_istream\< \_CharT, \_Traits \>::seekg()***,* **std::basic\_istream\< \_CharT, \_Traits \>::seekg()***,* **std::basic\_ios\< \_CharT, \_Traits \>::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* **std::basic\_istream\< \_CharT, \_Traits \>::\_M\_gcount***,* **std::ios\_base::badbit***,* **std::ios\_base::eofbit***,* **std::ios\_base::failbit***,* **std::ios\_base::goodbit***, and* **std::basic\_ios\< \_CharT, \_Traits \>::rdbuf()***.*

### 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* **std::basic\_istream\< \_CharT, \_Traits \>::\_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()***.*

### 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.*

### 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.*

*References* **std::basic\_ios\< \_CharT, \_Traits \>::clear()***, and* **std::basic\_ios\< \_CharT, \_Traits \>::rdstate()***.*

*Referenced by* **std::basic\_ostream\< \_CharT, \_Traits \>::flush()***,* **std::basic\_istream\< \_CharT, \_Traits \>::get()***,* **std::basic\_ostream\< char, \_Traits \>::operator\<\<()***,* **std::basic\_ostream\< \_CharT, \_Traits \>::operator\<\<()***,* **std::basic\_istream\< \_CharT, \_Traits \>::operator\>\>()***,* **std::basic\_istream\< char \>::operator\>\>()***,* **std::basic\_istream\< \_CharT, \_Traits \>::operator\>\>()***,* **std::basic\_istream\< \_CharT, \_Traits \>::peek()***,* **std::basic\_istream\< \_CharT, \_Traits \>::putback()***,* **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::basic\_istream\< \_CharT, \_Traits \>::unget()***.*

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

*Copying out the string buffer.*

**Returns**

`rdbuf()->str()`

### template\<typename \_CharT , typename \_Traits , typename \_Alloc \> void std::basic\_istringstream\< \_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\_ios\< \_CharT, \_Traits \>::rdbuf()***, and* **std::basic\_ios\< \_CharT, \_Traits \>::setstate()***.*

### static 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 \> \* std::basic\_ios\< \_CharT, \_Traits \>::tie () const` [inline]`, ` [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\_ios\< \_CharT, \_Traits \>::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* **std::basic\_istream\< \_CharT, \_Traits \>::\_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\_ios\< \_CharT, \_Traits \>::setstate()***.*

### 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 http://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.html*

*Referenced by* **std::basic\_ios\< \_CharT, \_Traits \>::fill()***.*

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

*Flags access.*

**Returns**

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

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

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

*Changing flags.*

**Parameters**

*\_\_wide The new width value.*

**Returns**

*The previous value of width().*

### static 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* **std::basic\_istream\< char \>::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::basic\_istream\< \_CharT, \_Traits \>::getline()***,* **std::basic\_istream\< char \>::ignore()***,* **std::basic\_istream\< \_CharT, \_Traits \>::ignore()***,* **std::basic\_istream\< \_CharT, \_Traits \>::ignore()***,* **std::basic\_istream\< \_CharT, \_Traits \>::ignore()***,* **std::basic\_istream\< \_CharT, \_Traits \>::peek()***,* **std::basic\_istream\< \_CharT, \_Traits \>::putback()***,* **std::basic\_istream\< \_CharT, \_Traits \>::read()***,* **std::basic\_istream\< \_CharT, \_Traits \>::readsome()***,* **std::basic\_istream\< char \>::seekg()***,* **std::basic\_istream\< char \>::sync()***,* **std::basic\_istream\< char \>::unget()***, and* **std::basic\_istream\< \_CharT, \_Traits \>::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\< \_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\_ios\< \_CharT, \_Traits \>::bad()***,* **std::basic\_ios\< \_CharT, \_Traits \>::fail()***,* **std::basic\_ostream\< \_CharT, \_Traits \>::flush()***,* **std::basic\_istream\< \_CharT, \_Traits \>::get()***,* **std::basic\_istream\< char \>::get()***,* **std::basic\_ostream\< char, \_Traits \>::operator\<\<()***,* **std::basic\_ostream\< \_CharT, \_Traits \>::operator\<\<()***,* **std::basic\_ostream\< char, \_Traits \>::operator\<\<()***,* **std::operator\>\>()***,* **std::basic\_istream\< char \>::operator\>\>()***,* **std::basic\_istream\< \_CharT, \_Traits \>::operator\>\>()***,* **std::basic\_istream\< \_CharT, \_Traits \>::peek()***,* **std::basic\_istream\< char \>::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 \>::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()***.*

### 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::basic\_istream\< \_CharT, \_Traits \>::sentry::sentry()***,* **std::time\_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::num\_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\_ios\< \_CharT, \_Traits \>::eof()***,* **std::basic\_istream\< char \>::get()***,* **std::basic\_istream\< \_CharT, \_Traits \>::get()***,* **std::basic\_istream\< \_CharT, \_Traits \>::get()***,* **std::time\_get\< \_CharT, \_InIter \>::get()***,* **std::basic\_istream\< \_CharT, \_Traits \>::operator\>\>()***,* **std::operator\>\>()***,* **std::basic\_istream\< \_CharT, \_Traits \>::peek()***,* **std::basic\_istream\< \_CharT, \_Traits \>::putback()***,* **std::basic\_istream\< \_CharT, \_Traits \>::read()***,* **std::basic\_istream\< \_CharT, \_Traits \>::readsome()***,* **std::basic\_istream\< char \>::seekg()***,* **std::basic\_istream\< \_CharT, \_Traits \>::seekg()***,* **std::basic\_istream\< \_CharT, \_Traits \>::seekg()***,* **std::basic\_istream\< \_CharT, \_Traits \>::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\_istream\< \_CharT, \_Traits \>::sentry::sentry()***,* **std::basic\_ostream\< \_CharT, \_Traits \>::sentry::sentry()***,* **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\_ios\< \_CharT, \_Traits \>::fail()***,* **std::basic\_istream\< \_CharT, \_Traits \>::get()***,* **std::time\_get\< \_CharT, \_InIter \>::get()***,* **std::basic\_istream\< char \>::ignore()***,* **std::basic\_istream\< \_CharT, \_Traits \>::operator\>\>()***,* **std::operator\>\>()***,* **std::basic\_istream\< char \>::operator\>\>()***,* **std::basic\_istream\< \_CharT, \_Traits \>::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::time\_get\< \_CharT, \_InIter \>::do\_get()***,* **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\_ostream\< \_CharT, \_Traits \>::flush()***,* **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 \>::getline()***,* **std::basic\_istream\< \_CharT, \_Traits \>::ignore()***,* **std::basic\_istream\< \_CharT, \_Traits \>::ignore()***,* **std::basic\_istream\< \_CharT, \_Traits \>::ignore()***,* **std::basic\_ostream\< char, \_Traits \>::operator\<\<()***,* **std::basic\_ostream\< \_CharT, \_Traits \>::operator\<\<()***,* **std::basic\_istream\< \_CharT, \_Traits \>::operator\>\>()***,* **std::operator\>\>()***,* **std::basic\_istream\< char \>::operator\>\>()***,* **std::basic\_istream\< \_CharT, \_Traits \>::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\_stringbuf\< \_CharT, \_Traits, \_Alloc \>::overflow()***,* **std::basic\_filebuf\< \_CharT, \_Traits \>::pbackfail()***,* **std::basic\_istream\< \_CharT, \_Traits \>::seekg()***,* **std::basic\_istream\< \_CharT, \_Traits \>::seekg()***,* **std::basic\_stringbuf\< \_CharT, \_Traits, \_Alloc \>::seekoff()***,* **std::basic\_stringbuf\< \_CharT, \_Traits, \_Alloc \>::seekpos()***,* **std::basic\_filebuf\< \_CharT, \_Traits \>::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()***, and* **std::left()***.*

### 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\_filebuf\< \_CharT, \_Traits \>::overflow()***,* **std::basic\_stringbuf\< \_CharT, \_Traits, \_Alloc \>::overflow()***,* **std::basic\_stringbuf\< \_CharT, \_Traits, \_Alloc \>::pbackfail()***,* **std::basic\_stringbuf\< \_CharT, \_Traits, \_Alloc \>::seekoff()***,* **std::basic\_ostream\< \_CharT, \_Traits \>::seekp()***,* **std::basic\_ostream\< \_CharT, \_Traits \>::seekp()***,* **std::basic\_stringbuf\< \_CharT, \_Traits, \_Alloc \>::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::basic\_istream\< \_CharT, \_Traits \>::sentry::sentry()***,* **std::noskipws()***,* **std::\_\_detail::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::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.*
