Namespaces
Variants
Views
Actions

std::num_get

From cppreference.com
< cpp‎ | locale
Revision as of 13:30, 22 November 2011 by Cubbi (Talk | contribs)

Template:cpp/locale/sidebar Template:ddcl list begin <tr class="t-dsc-header">

<td>
Defined in header <locale>
</td>

<td></td> <td></td> </tr> <tr class="t-dcl ">

<td class="t-dcl-nopad">
template< class charT,

          class InputIterator = std::istreambuf_iterator<charT>

> class num_get : public std::locale::facet;
</td>

<td class="t-dcl-nopad"> </td> <td class="t-dcl-nopad"> </td> </tr> Template:ddcl list end

Class std::num_get encapsulates the rules for parsing string representations of values of type Template:cpp, Template:cpp, Template:cpp, Template:cpp, Template:cpp, Template:cpp, Template:cpp, Template:cpp, Template:cpp, Template:cpp, and Template:cpp. The standard formatting input operators (such as Template:cpp) use the std::num_get facet of the I/O stream's locale to parse the text representations of the numbers.

Two specializations and two partial specializations are provided by the standard library and are implemented by all locale objects created in a C++ program:

Template:tdcl list begin Template:tdcl list header Template:tdcl list item Template:tdcl list item Template:tdcl list item Template:tdcl list item Template:tdcl list end

Contents

Member types

Template:tdcl list begin Template:tdcl list hitem Template:tdcl list item Template:tdcl list item Template:tdcl list end

Member objects

Template:tdcl list begin Template:tdcl list hitem Template:tdcl list item Template:tdcl list end

Member functions

constructs a new num_get facet
(public member function)
destructs a num_get facet
(protected member function)
invokes do_get
(public member function)

Protected member functions

[virtual]
parses a number from an input stream
(virtual protected member function)

Example

Template:example cpp

See also

Template:cpp/locale/dcl list numpunctTemplate:cpp/locale/dcl list num putTemplate:cpp/string/basic string/dcl list stolTemplate:cpp/string/basic string/dcl list stoulTemplate:cpp/string/basic string/dcl list stof