---
name: "std::num_get"
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::num_get"
---

# std::num\_get(3)

Primary class template num\_get.

## NAME

std::num\_get\< \_CharT, \_InIter \> - Primary class template num\_get.

## SYNOPSIS

\#include \<locale\>

Inherits **std::locale::facet**.

### Public Types

typedef \_CharT **char\_type**\
 Public typedefs.  typedef \_InIter **iter\_type**\
 Public typedefs.

### Public Member Functions

**num\_get** (size\_t \_\_refs=0)\
 Constructor performs initialization.  template\<typename \_ValueT\> \_InIter **\_M\_extract\_int** (\_InIter \_\_beg, \_InIter \_\_end, **ios\_base** &\_\_io, **ios\_base::iostate** &\_\_err, \_ValueT &\_\_v) const\
 **iter\_type** **get** (**iter\_type** \_\_in, **iter\_type** \_\_end, **ios\_base** &\_\_io, **ios\_base::iostate** &\_\_err, bool &\_\_v) const\
 Numeric parsing.  **iter\_type** **get** (**iter\_type** \_\_in, **iter\_type** \_\_end, **ios\_base** &\_\_io, **ios\_base::iostate** &\_\_err, void \*&\_\_v) const\
 Numeric parsing.

**iter\_type** **get** (**iter\_type** \_\_in, **iter\_type** \_\_end, **ios\_base** &\_\_io, **ios\_base::iostate** &\_\_err, long &\_\_v) const\
 Numeric parsing.  **iter\_type** **get** (**iter\_type** \_\_in, **iter\_type** \_\_end, **ios\_base** &\_\_io, **ios\_base::iostate** &\_\_err, unsigned short &\_\_v) const\
 Numeric parsing.  **iter\_type** **get** (**iter\_type** \_\_in, **iter\_type** \_\_end, **ios\_base** &\_\_io, **ios\_base::iostate** &\_\_err, unsigned int &\_\_v) const\
 Numeric parsing.  **iter\_type** **get** (**iter\_type** \_\_in, **iter\_type** \_\_end, **ios\_base** &\_\_io, **ios\_base::iostate** &\_\_err, unsigned long &\_\_v) const\
 Numeric parsing.  **iter\_type** **get** (**iter\_type** \_\_in, **iter\_type** \_\_end, **ios\_base** &\_\_io, **ios\_base::iostate** &\_\_err, long long &\_\_v) const\
 Numeric parsing.  **iter\_type** **get** (**iter\_type** \_\_in, **iter\_type** \_\_end, **ios\_base** &\_\_io, **ios\_base::iostate** &\_\_err, unsigned long long &\_\_v) const\
 Numeric parsing.

**iter\_type** **get** (**iter\_type** \_\_in, **iter\_type** \_\_end, **ios\_base** &\_\_io, **ios\_base::iostate** &\_\_err, float &\_\_v) const\
 Numeric parsing.  **iter\_type** **get** (**iter\_type** \_\_in, **iter\_type** \_\_end, **ios\_base** &\_\_io, **ios\_base::iostate** &\_\_err, double &\_\_v) const\
 Numeric parsing.  **iter\_type** **get** (**iter\_type** \_\_in, **iter\_type** \_\_end, **ios\_base** &\_\_io, **ios\_base::iostate** &\_\_err, long double &\_\_v) const\
 Numeric parsing.

### Static Public Attributes

static **locale::id** **id**\
 Numpunct facet id.

### Protected Member Functions

virtual **~num\_get** ()\
 Destructor.  **iter\_type** **\_M\_extract\_float** (**iter\_type**, **iter\_type**, **ios\_base** &, **ios\_base::iostate** &, **string** &) const\
 template\<typename \_ValueT\> **iter\_type** **\_M\_extract\_int** (**iter\_type**, **iter\_type**, **ios\_base** &, **ios\_base::iostate** &, \_ValueT &) const\
 template\<typename \_CharT2\> \_\_gnu\_cxx::\_\_enable\_if\< \_\_is\_char\< \_CharT2 \>::\_\_value, int \>::\_\_type **\_M\_find** (const \_CharT2 \*, size\_t \_\_len, \_CharT2 \_\_c) const\
 template\<typename \_CharT2\> \_\_gnu\_cxx::\_\_enable\_if\<!\_\_is\_char\< \_CharT2 \>::\_\_value, int \>::\_\_type **\_M\_find** (const \_CharT2 \*\_\_zero, size\_t \_\_len, \_CharT2 \_\_c) const\

virtual **iter\_type** **do\_get** (**iter\_type**, **iter\_type**, **ios\_base** &, **ios\_base::iostate** &, bool &) const\
 Numeric parsing.  virtual **iter\_type** **do\_get** (**iter\_type** \_\_beg, **iter\_type** \_\_end, **ios\_base** &\_\_io, **ios\_base::iostate** &\_\_err, long &\_\_v) const\
 Numeric parsing.  virtual **iter\_type** **do\_get** (**iter\_type** \_\_beg, **iter\_type** \_\_end, **ios\_base** &\_\_io, **ios\_base::iostate** &\_\_err, unsigned short &\_\_v) const\
 Numeric parsing.  virtual **iter\_type** **do\_get** (**iter\_type** \_\_beg, **iter\_type** \_\_end, **ios\_base** &\_\_io, **ios\_base::iostate** &\_\_err, unsigned int &\_\_v) const\
 Numeric parsing.  virtual **iter\_type** **do\_get** (**iter\_type** \_\_beg, **iter\_type** \_\_end, **ios\_base** &\_\_io, **ios\_base::iostate** &\_\_err, unsigned long &\_\_v) const\
 Numeric parsing.  virtual **iter\_type** **do\_get** (**iter\_type** \_\_beg, **iter\_type** \_\_end, **ios\_base** &\_\_io, **ios\_base::iostate** &\_\_err, long long &\_\_v) const\
 Numeric parsing.  virtual **iter\_type** **do\_get** (**iter\_type** \_\_beg, **iter\_type** \_\_end, **ios\_base** &\_\_io, **ios\_base::iostate** &\_\_err, unsigned long long &\_\_v) const\
 Numeric parsing.  virtual **iter\_type** **do\_get** (**iter\_type**, **iter\_type**, **ios\_base** &, **ios\_base::iostate** &, float &) const\
 Numeric parsing.  virtual **iter\_type** **do\_get** (**iter\_type**, **iter\_type**, **ios\_base** &, **ios\_base::iostate** &, double &) const\
 Numeric parsing.  virtual **iter\_type** **do\_get** (**iter\_type**, **iter\_type**, **ios\_base** &, **ios\_base::iostate** &, long double &) const\
 Numeric parsing.  virtual **iter\_type** **do\_get** (**iter\_type**, **iter\_type**, **ios\_base** &, **ios\_base::iostate** &, void \*&) const\
 Numeric parsing.

### Static Protected Member Functions

static \_\_c\_locale **\_S\_clone\_c\_locale** (\_\_c\_locale &\_\_cloc)  throw ()\
 static void **\_S\_create\_c\_locale** (\_\_c\_locale &\_\_cloc, const char \*\_\_s, \_\_c\_locale \_\_old=0)\
 static void **\_S\_destroy\_c\_locale** (\_\_c\_locale &\_\_cloc)\
 static \_\_c\_locale **\_S\_get\_c\_locale** ()\
 static const char \* **\_S\_get\_c\_name** ()  throw ()\
 static \_\_c\_locale **\_S\_lc\_ctype\_c\_locale** (\_\_c\_locale \_\_cloc, const char \*\_\_s)\

## Detailed Description

### template\<typename \_CharT, typename \_InIter\>

class std::num\_get\< \_CharT, \_InIter \>"Primary class template num\_get.

This facet encapsulates the code to parse and return a number from a string. It is used by the istream numeric extraction operators.

The num\_get template uses protected virtual functions to provide the actual results. The public accessors forward the call to the virtual functions. These virtual functions are hooks for developers to implement the behavior they require from the num\_get facet.

## Member Typedef Documentation

### template\<typename \_CharT, typename \_InIter\> typedef \_CharT std::num\_get\< \_CharT, \_InIter \>::char\_type

Public typedefs.

### template\<typename \_CharT, typename \_InIter\> typedef \_InIter std::num\_get\< \_CharT, \_InIter \>::iter\_type

Public typedefs.

## Constructor & Destructor Documentation

### template\<typename \_CharT, typename \_InIter\> std::num\_get\< \_CharT, \_InIter \>::num\_get (size\_t \_\_refs = 0) \[inline\], \[explicit\]

Constructor performs initialization. This is the constructor provided by the standard.

**Parameters**

*\_\_refs* Passed to the base facet class.

### template\<typename \_CharT, typename \_InIter\> virtual std::num\_get\< \_CharT, \_InIter \>::~num\_get () \[inline\], \[protected\], \[virtual\]

Destructor.

## Member Function Documentation

### template\<typename \_CharT, typename \_InIter\> virtual iter\_type std::num\_get\< \_CharT, \_InIter \>::do\_get (iter\_type \_\_beg, iter\_type \_\_end, ios\_base & \_\_io, ios\_base::iostate & \_\_err, long & \_\_v) const \[inline\], \[protected\], \[virtual\]

Numeric parsing. Parses the input stream into the variable *v*. This function is a hook for derived classes to change the value returned.

**See also**

get() for more details.

**Parameters**

*\_\_beg* Start of input stream. \
 *\_\_end* End of input stream. \
 *\_\_io* Source of locale and flags. \
 *\_\_err* Error flags to set. \
 *\_\_v* Value to format and insert.

**Returns**

Iterator after reading.

### template\<typename \_CharT, typename \_InIter\> virtual iter\_type std::num\_get\< \_CharT, \_InIter \>::do\_get (iter\_type \_\_beg, iter\_type \_\_end, ios\_base & \_\_io, ios\_base::iostate & \_\_err, long long & \_\_v) const \[inline\], \[protected\], \[virtual\]

Numeric parsing. Parses the input stream into the variable *v*. This function is a hook for derived classes to change the value returned.

**See also**

get() for more details.

**Parameters**

*\_\_beg* Start of input stream. \
 *\_\_end* End of input stream. \
 *\_\_io* Source of locale and flags. \
 *\_\_err* Error flags to set. \
 *\_\_v* Value to format and insert.

**Returns**

Iterator after reading.

### template\<typename \_CharT, typename \_InIter\> virtual iter\_type std::num\_get\< \_CharT, \_InIter \>::do\_get (iter\_type \_\_beg, iter\_type \_\_end, ios\_base & \_\_io, ios\_base::iostate & \_\_err, unsigned int & \_\_v) const \[inline\], \[protected\], \[virtual\]

Numeric parsing. Parses the input stream into the variable *v*. This function is a hook for derived classes to change the value returned.

**See also**

get() for more details.

**Parameters**

*\_\_beg* Start of input stream. \
 *\_\_end* End of input stream. \
 *\_\_io* Source of locale and flags. \
 *\_\_err* Error flags to set. \
 *\_\_v* Value to format and insert.

**Returns**

Iterator after reading.

### template\<typename \_CharT, typename \_InIter\> virtual iter\_type std::num\_get\< \_CharT, \_InIter \>::do\_get (iter\_type \_\_beg, iter\_type \_\_end, ios\_base & \_\_io, ios\_base::iostate & \_\_err, unsigned long & \_\_v) const \[inline\], \[protected\], \[virtual\]

Numeric parsing. Parses the input stream into the variable *v*. This function is a hook for derived classes to change the value returned.

**See also**

get() for more details.

**Parameters**

*\_\_beg* Start of input stream. \
 *\_\_end* End of input stream. \
 *\_\_io* Source of locale and flags. \
 *\_\_err* Error flags to set. \
 *\_\_v* Value to format and insert.

**Returns**

Iterator after reading.

### template\<typename \_CharT, typename \_InIter\> virtual iter\_type std::num\_get\< \_CharT, \_InIter \>::do\_get (iter\_type \_\_beg, iter\_type \_\_end, ios\_base & \_\_io, ios\_base::iostate & \_\_err, unsigned long long & \_\_v) const \[inline\], \[protected\], \[virtual\]

Numeric parsing. Parses the input stream into the variable *v*. This function is a hook for derived classes to change the value returned.

**See also**

get() for more details.

**Parameters**

*\_\_beg* Start of input stream. \
 *\_\_end* End of input stream. \
 *\_\_io* Source of locale and flags. \
 *\_\_err* Error flags to set. \
 *\_\_v* Value to format and insert.

**Returns**

Iterator after reading.

### template\<typename \_CharT, typename \_InIter\> virtual iter\_type std::num\_get\< \_CharT, \_InIter \>::do\_get (iter\_type \_\_beg, iter\_type \_\_end, ios\_base & \_\_io, ios\_base::iostate & \_\_err, unsigned short & \_\_v) const \[inline\], \[protected\], \[virtual\]

Numeric parsing. Parses the input stream into the variable *v*. This function is a hook for derived classes to change the value returned.

**See also**

get() for more details.

**Parameters**

*\_\_beg* Start of input stream. \
 *\_\_end* End of input stream. \
 *\_\_io* Source of locale and flags. \
 *\_\_err* Error flags to set. \
 *\_\_v* Value to format and insert.

**Returns**

Iterator after reading.

### template\<typename \_CharT, typename \_InIter\> \_InIter std::num\_get\< \_CharT, \_InIter \>::do\_get (iter\_type \_\_beg, iter\_type \_\_end, ios\_base & \_\_io, ios\_base::iostate & \_\_err, bool & \_\_v) const \[protected\], \[virtual\]

Numeric parsing. Parses the input stream into the variable *v*. This function is a hook for derived classes to change the value returned.

**See also**

get() for more details.

**Parameters**

*\_\_beg* Start of input stream. \
 *\_\_end* End of input stream. \
 *\_\_io* Source of locale and flags. \
 *\_\_err* Error flags to set. \
 *\_\_v* Value to format and insert.

**Returns**

Iterator after reading.

References **std::ios\_base::\_M\_getloc()**, **std::ios\_base::boolalpha**, **std::ios\_base::eofbit**, **std::ios\_base::failbit**, **std::ios\_base::flags()**, and **std::ios\_base::goodbit**.

Referenced by **std::num\_get\< \_CharT, istreambuf\_iterator\< \_CharT, \_Traits \> \>::get()**, **std::num\_get\< \_CharT, istreambuf\_iterator\< \_CharT, \_Traits \> \>::get()**, **std::num\_get\< \_CharT, istreambuf\_iterator\< \_CharT, \_Traits \> \>::get()**, **std::num\_get\< \_CharT, istreambuf\_iterator\< \_CharT, \_Traits \> \>::get()**, **std::num\_get\< \_CharT, istreambuf\_iterator\< \_CharT, \_Traits \> \>::get()**, **std::num\_get\< \_CharT, istreambuf\_iterator\< \_CharT, \_Traits \> \>::get()**, **std::num\_get\< \_CharT, istreambuf\_iterator\< \_CharT, \_Traits \> \>::get()**, **std::num\_get\< \_CharT, istreambuf\_iterator\< \_CharT, \_Traits \> \>::get()**, **std::num\_get\< \_CharT, istreambuf\_iterator\< \_CharT, \_Traits \> \>::get()**, **std::num\_get\< \_CharT, istreambuf\_iterator\< \_CharT, \_Traits \> \>::get()**, and **std::num\_get\< \_CharT, istreambuf\_iterator\< \_CharT, \_Traits \> \>::get()**.

### template\<typename \_CharT, typename \_InIter\> \_InIter std::num\_get\< \_CharT, \_InIter \>::do\_get (iter\_type \_\_beg, iter\_type \_\_end, ios\_base & \_\_io, ios\_base::iostate & \_\_err, double & \_\_v) const \[protected\], \[virtual\]

Numeric parsing. Parses the input stream into the variable *v*. This function is a hook for derived classes to change the value returned.

**See also**

get() for more details.

**Parameters**

*\_\_beg* Start of input stream. \
 *\_\_end* End of input stream. \
 *\_\_io* Source of locale and flags. \
 *\_\_err* Error flags to set. \
 *\_\_v* Value to format and insert.

**Returns**

Iterator after reading.

References **std::basic\_string\< \_CharT, \_Traits, \_Alloc \>::c\_str()**, **std::ios\_base::eofbit**, and **std::basic\_string\< \_CharT, \_Traits, \_Alloc \>::reserve()**.

### template\<typename \_CharT, typename \_InIter\> \_InIter std::num\_get\< \_CharT, \_InIter \>::do\_get (iter\_type \_\_beg, iter\_type \_\_end, ios\_base & \_\_io, ios\_base::iostate & \_\_err, float & \_\_v) const \[protected\], \[virtual\]

Numeric parsing. Parses the input stream into the variable *v*. This function is a hook for derived classes to change the value returned.

**See also**

get() for more details.

**Parameters**

*\_\_beg* Start of input stream. \
 *\_\_end* End of input stream. \
 *\_\_io* Source of locale and flags. \
 *\_\_err* Error flags to set. \
 *\_\_v* Value to format and insert.

**Returns**

Iterator after reading.

References **std::basic\_string\< \_CharT, \_Traits, \_Alloc \>::c\_str()**, **std::ios\_base::eofbit**, and **std::basic\_string\< \_CharT, \_Traits, \_Alloc \>::reserve()**.

### template\<typename \_CharT, typename \_InIter\> \_InIter std::num\_get\< \_CharT, \_InIter \>::do\_get (iter\_type \_\_beg, iter\_type \_\_end, ios\_base & \_\_io, ios\_base::iostate & \_\_err, long double & \_\_v) const \[protected\], \[virtual\]

Numeric parsing. Parses the input stream into the variable *v*. This function is a hook for derived classes to change the value returned.

**See also**

get() for more details.

**Parameters**

*\_\_beg* Start of input stream. \
 *\_\_end* End of input stream. \
 *\_\_io* Source of locale and flags. \
 *\_\_err* Error flags to set. \
 *\_\_v* Value to format and insert.

**Returns**

Iterator after reading.

References **std::basic\_string\< \_CharT, \_Traits, \_Alloc \>::c\_str()**, **std::ios\_base::eofbit**, and **std::basic\_string\< \_CharT, \_Traits, \_Alloc \>::reserve()**.

### template\<typename \_CharT, typename \_InIter\> \_InIter std::num\_get\< \_CharT, \_InIter \>::do\_get (iter\_type \_\_beg, iter\_type \_\_end, ios\_base & \_\_io, ios\_base::iostate & \_\_err, void \*& \_\_v) const \[protected\], \[virtual\]

Numeric parsing. Parses the input stream into the variable *v*. This function is a hook for derived classes to change the value returned.

**See also**

get() for more details.

**Parameters**

*\_\_beg* Start of input stream. \
 *\_\_end* End of input stream. \
 *\_\_io* Source of locale and flags. \
 *\_\_err* Error flags to set. \
 *\_\_v* Value to format and insert.

**Returns**

Iterator after reading.

References **std::ios\_base::basefield**, **std::ios\_base::flags()**, and **std::ios\_base::hex**.

### template\<typename \_CharT, typename \_InIter\> iter\_type std::num\_get\< \_CharT, \_InIter \>::get (iter\_type \_\_in, iter\_type \_\_end, ios\_base & \_\_io, ios\_base::iostate & \_\_err, bool & \_\_v) const \[inline\]

Numeric parsing. Parses the input stream into the bool *v*. It does so by calling num\_get::do\_get().

If ios\_base::boolalpha is set, attempts to read ctype\<CharT\>::truename() or ctype\<CharT\>::falsename(). Sets *v* to true or false if successful. Sets err to ios\_base::failbit if reading the string fails. Sets err to ios\_base::eofbit if the stream is emptied.

If ios\_base::boolalpha is not set, proceeds as with reading a long, except if the value is 1, sets *v* to true, if the value is 0, sets *v* to false, and otherwise set err to ios\_base::failbit.

**Parameters**

*\_\_in* Start of input stream. \
 *\_\_end* End of input stream. \
 *\_\_io* Source of locale and flags. \
 *\_\_err* Error flags to set. \
 *\_\_v* Value to format and insert.

**Returns**

Iterator after reading.

Referenced by **std::basic\_istream\< \_CharT, \_Traits \>::operator\>\>()**.

### template\<typename \_CharT, typename \_InIter\> iter\_type std::num\_get\< \_CharT, \_InIter \>::get (iter\_type \_\_in, iter\_type \_\_end, ios\_base & \_\_io, ios\_base::iostate & \_\_err, double & \_\_v) const \[inline\]

Numeric parsing. Parses the input stream into the integral variable *v*. It does so by calling num\_get::do\_get().

The input characters are parsed like the scanf g specifier. The matching type length modifier is also used.

The decimal point character used is numpunct::decimal\_point(). Digit grouping is interpreted according to numpunct::grouping() and numpunct::thousands\_sep(). If the pattern of digit groups isn't consistent, sets err to ios\_base::failbit.

If parsing the string yields a valid value for *v*, *v* is set. Otherwise, sets err to ios\_base::failbit and leaves *v* unaltered. Sets err to ios\_base::eofbit if the stream is emptied.

**Parameters**

*\_\_in* Start of input stream. \
 *\_\_end* End of input stream. \
 *\_\_io* Source of locale and flags. \
 *\_\_err* Error flags to set. \
 *\_\_v* Value to format and insert.

**Returns**

Iterator after reading.

### template\<typename \_CharT, typename \_InIter\> iter\_type std::num\_get\< \_CharT, \_InIter \>::get (iter\_type \_\_in, iter\_type \_\_end, ios\_base & \_\_io, ios\_base::iostate & \_\_err, float & \_\_v) const \[inline\]

Numeric parsing. Parses the input stream into the integral variable *v*. It does so by calling num\_get::do\_get().

The input characters are parsed like the scanf g specifier. The matching type length modifier is also used.

The decimal point character used is numpunct::decimal\_point(). Digit grouping is interpreted according to numpunct::grouping() and numpunct::thousands\_sep(). If the pattern of digit groups isn't consistent, sets err to ios\_base::failbit.

If parsing the string yields a valid value for *v*, *v* is set. Otherwise, sets err to ios\_base::failbit and leaves *v* unaltered. Sets err to ios\_base::eofbit if the stream is emptied.

**Parameters**

*\_\_in* Start of input stream. \
 *\_\_end* End of input stream. \
 *\_\_io* Source of locale and flags. \
 *\_\_err* Error flags to set. \
 *\_\_v* Value to format and insert.

**Returns**

Iterator after reading.

### template\<typename \_CharT, typename \_InIter\> iter\_type std::num\_get\< \_CharT, \_InIter \>::get (iter\_type \_\_in, iter\_type \_\_end, ios\_base & \_\_io, ios\_base::iostate & \_\_err, long & \_\_v) const \[inline\]

Numeric parsing. Parses the input stream into the integral variable *v*. It does so by calling num\_get::do\_get().

Parsing is affected by the flag settings in *io*.

The basic parse is affected by the value of io.flags() & ios\_base::basefield. If equal to ios\_base::oct, parses like the scanf o specifier. Else if equal to ios\_base::hex, parses like X specifier. Else if basefield equal to 0, parses like the i specifier. Otherwise, parses like d for signed and u for unsigned types. The matching type length modifier is also used.

Digit grouping is interpreted according to numpunct::grouping() and numpunct::thousands\_sep(). If the pattern of digit groups isn't consistent, sets err to ios\_base::failbit.

If parsing the string yields a valid value for *v*, *v* is set. Otherwise, sets err to ios\_base::failbit and leaves *v* unaltered. Sets err to ios\_base::eofbit if the stream is emptied.

**Parameters**

*\_\_in* Start of input stream. \
 *\_\_end* End of input stream. \
 *\_\_io* Source of locale and flags. \
 *\_\_err* Error flags to set. \
 *\_\_v* Value to format and insert.

**Returns**

Iterator after reading.

### template\<typename \_CharT, typename \_InIter\> iter\_type std::num\_get\< \_CharT, \_InIter \>::get (iter\_type \_\_in, iter\_type \_\_end, ios\_base & \_\_io, ios\_base::iostate & \_\_err, long double & \_\_v) const \[inline\]

Numeric parsing. Parses the input stream into the integral variable *v*. It does so by calling num\_get::do\_get().

The input characters are parsed like the scanf g specifier. The matching type length modifier is also used.

The decimal point character used is numpunct::decimal\_point(). Digit grouping is interpreted according to numpunct::grouping() and numpunct::thousands\_sep(). If the pattern of digit groups isn't consistent, sets err to ios\_base::failbit.

If parsing the string yields a valid value for *v*, *v* is set. Otherwise, sets err to ios\_base::failbit and leaves *v* unaltered. Sets err to ios\_base::eofbit if the stream is emptied.

**Parameters**

*\_\_in* Start of input stream. \
 *\_\_end* End of input stream. \
 *\_\_io* Source of locale and flags. \
 *\_\_err* Error flags to set. \
 *\_\_v* Value to format and insert.

**Returns**

Iterator after reading.

### template\<typename \_CharT, typename \_InIter\> iter\_type std::num\_get\< \_CharT, \_InIter \>::get (iter\_type \_\_in, iter\_type \_\_end, ios\_base & \_\_io, ios\_base::iostate & \_\_err, long long & \_\_v) const \[inline\]

Numeric parsing. Parses the input stream into the integral variable *v*. It does so by calling num\_get::do\_get().

Parsing is affected by the flag settings in *io*.

The basic parse is affected by the value of io.flags() & ios\_base::basefield. If equal to ios\_base::oct, parses like the scanf o specifier. Else if equal to ios\_base::hex, parses like X specifier. Else if basefield equal to 0, parses like the i specifier. Otherwise, parses like d for signed and u for unsigned types. The matching type length modifier is also used.

Digit grouping is interpreted according to numpunct::grouping() and numpunct::thousands\_sep(). If the pattern of digit groups isn't consistent, sets err to ios\_base::failbit.

If parsing the string yields a valid value for *v*, *v* is set. Otherwise, sets err to ios\_base::failbit and leaves *v* unaltered. Sets err to ios\_base::eofbit if the stream is emptied.

**Parameters**

*\_\_in* Start of input stream. \
 *\_\_end* End of input stream. \
 *\_\_io* Source of locale and flags. \
 *\_\_err* Error flags to set. \
 *\_\_v* Value to format and insert.

**Returns**

Iterator after reading.

### template\<typename \_CharT, typename \_InIter\> iter\_type std::num\_get\< \_CharT, \_InIter \>::get (iter\_type \_\_in, iter\_type \_\_end, ios\_base & \_\_io, ios\_base::iostate & \_\_err, unsigned int & \_\_v) const \[inline\]

Numeric parsing. Parses the input stream into the integral variable *v*. It does so by calling num\_get::do\_get().

Parsing is affected by the flag settings in *io*.

The basic parse is affected by the value of io.flags() & ios\_base::basefield. If equal to ios\_base::oct, parses like the scanf o specifier. Else if equal to ios\_base::hex, parses like X specifier. Else if basefield equal to 0, parses like the i specifier. Otherwise, parses like d for signed and u for unsigned types. The matching type length modifier is also used.

Digit grouping is interpreted according to numpunct::grouping() and numpunct::thousands\_sep(). If the pattern of digit groups isn't consistent, sets err to ios\_base::failbit.

If parsing the string yields a valid value for *v*, *v* is set. Otherwise, sets err to ios\_base::failbit and leaves *v* unaltered. Sets err to ios\_base::eofbit if the stream is emptied.

**Parameters**

*\_\_in* Start of input stream. \
 *\_\_end* End of input stream. \
 *\_\_io* Source of locale and flags. \
 *\_\_err* Error flags to set. \
 *\_\_v* Value to format and insert.

**Returns**

Iterator after reading.

### template\<typename \_CharT, typename \_InIter\> iter\_type std::num\_get\< \_CharT, \_InIter \>::get (iter\_type \_\_in, iter\_type \_\_end, ios\_base & \_\_io, ios\_base::iostate & \_\_err, unsigned long & \_\_v) const \[inline\]

Numeric parsing. Parses the input stream into the integral variable *v*. It does so by calling num\_get::do\_get().

Parsing is affected by the flag settings in *io*.

The basic parse is affected by the value of io.flags() & ios\_base::basefield. If equal to ios\_base::oct, parses like the scanf o specifier. Else if equal to ios\_base::hex, parses like X specifier. Else if basefield equal to 0, parses like the i specifier. Otherwise, parses like d for signed and u for unsigned types. The matching type length modifier is also used.

Digit grouping is interpreted according to numpunct::grouping() and numpunct::thousands\_sep(). If the pattern of digit groups isn't consistent, sets err to ios\_base::failbit.

If parsing the string yields a valid value for *v*, *v* is set. Otherwise, sets err to ios\_base::failbit and leaves *v* unaltered. Sets err to ios\_base::eofbit if the stream is emptied.

**Parameters**

*\_\_in* Start of input stream. \
 *\_\_end* End of input stream. \
 *\_\_io* Source of locale and flags. \
 *\_\_err* Error flags to set. \
 *\_\_v* Value to format and insert.

**Returns**

Iterator after reading.

### template\<typename \_CharT, typename \_InIter\> iter\_type std::num\_get\< \_CharT, \_InIter \>::get (iter\_type \_\_in, iter\_type \_\_end, ios\_base & \_\_io, ios\_base::iostate & \_\_err, unsigned long long & \_\_v) const \[inline\]

Numeric parsing. Parses the input stream into the integral variable *v*. It does so by calling num\_get::do\_get().

Parsing is affected by the flag settings in *io*.

The basic parse is affected by the value of io.flags() & ios\_base::basefield. If equal to ios\_base::oct, parses like the scanf o specifier. Else if equal to ios\_base::hex, parses like X specifier. Else if basefield equal to 0, parses like the i specifier. Otherwise, parses like d for signed and u for unsigned types. The matching type length modifier is also used.

Digit grouping is interpreted according to numpunct::grouping() and numpunct::thousands\_sep(). If the pattern of digit groups isn't consistent, sets err to ios\_base::failbit.

If parsing the string yields a valid value for *v*, *v* is set. Otherwise, sets err to ios\_base::failbit and leaves *v* unaltered. Sets err to ios\_base::eofbit if the stream is emptied.

**Parameters**

*\_\_in* Start of input stream. \
 *\_\_end* End of input stream. \
 *\_\_io* Source of locale and flags. \
 *\_\_err* Error flags to set. \
 *\_\_v* Value to format and insert.

**Returns**

Iterator after reading.

### template\<typename \_CharT, typename \_InIter\> iter\_type std::num\_get\< \_CharT, \_InIter \>::get (iter\_type \_\_in, iter\_type \_\_end, ios\_base & \_\_io, ios\_base::iostate & \_\_err, unsigned short & \_\_v) const \[inline\]

Numeric parsing. Parses the input stream into the integral variable *v*. It does so by calling num\_get::do\_get().

Parsing is affected by the flag settings in *io*.

The basic parse is affected by the value of io.flags() & ios\_base::basefield. If equal to ios\_base::oct, parses like the scanf o specifier. Else if equal to ios\_base::hex, parses like X specifier. Else if basefield equal to 0, parses like the i specifier. Otherwise, parses like d for signed and u for unsigned types. The matching type length modifier is also used.

Digit grouping is interpreted according to numpunct::grouping() and numpunct::thousands\_sep(). If the pattern of digit groups isn't consistent, sets err to ios\_base::failbit.

If parsing the string yields a valid value for *v*, *v* is set. Otherwise, sets err to ios\_base::failbit and leaves *v* unaltered. Sets err to ios\_base::eofbit if the stream is emptied.

**Parameters**

*\_\_in* Start of input stream. \
 *\_\_end* End of input stream. \
 *\_\_io* Source of locale and flags. \
 *\_\_err* Error flags to set. \
 *\_\_v* Value to format and insert.

**Returns**

Iterator after reading.

### template\<typename \_CharT, typename \_InIter\> iter\_type std::num\_get\< \_CharT, \_InIter \>::get (iter\_type \_\_in, iter\_type \_\_end, ios\_base & \_\_io, ios\_base::iostate & \_\_err, void \*& \_\_v) const \[inline\]

Numeric parsing. Parses the input stream into the pointer variable *v*. It does so by calling num\_get::do\_get().

The input characters are parsed like the scanf p specifier.

Digit grouping is interpreted according to numpunct::grouping() and numpunct::thousands\_sep(). If the pattern of digit groups isn't consistent, sets err to ios\_base::failbit.

Note that the digit grouping effect for pointers is a bit ambiguous in the standard and shouldn't be relied on. See DR 344.

If parsing the string yields a valid value for *v*, *v* is set. Otherwise, sets err to ios\_base::failbit and leaves *v* unaltered. Sets err to ios\_base::eofbit if the stream is emptied.

**Parameters**

*\_\_in* Start of input stream. \
 *\_\_end* End of input stream. \
 *\_\_io* Source of locale and flags. \
 *\_\_err* Error flags to set. \
 *\_\_v* Value to format and insert.

**Returns**

Iterator after reading.

## Member Data Documentation

### template\<typename \_CharT, typename \_InIter\> locale::id std::num\_get\< \_CharT, \_InIter \>::id \[static\]

Numpunct facet id.

## Author

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