[category.numeric.general] (original) (raw)

28 Text processing library [text]

28.3 Localization library [localization]

28.3.4 Standard locale categories [locale.categories]

28.3.4.3 The numeric category [category.numeric]

28.3.4.3.1 General [category.numeric.general]

The classes num_get<> and num_put<>handle numeric formatting and parsing.

Virtual functions are provided for several numeric types.

Implementations may (but are not required to) delegate extraction of smaller types to extractors for larger types.[224](#footnote-224 "Parsing "-1" correctly into, e.g., an unsigned short requires that the corresponding member get() at least extract the sign before delegating.")

All specifications of member functions for num_put and num_getin the subclauses of [category.numeric] only apply to the specializations required in Tables 89and 90 ([locale.category]), namelynum_get<char>,num_get<wchar_t>,num_get<C, InputIterator>,num_put<char>,num_put<wchar_t>, andnum_put<C, OutputIterator>.

These specializations refer to the ios_base& argument for formatting specifications ([locale.categories]), and to its imbued locale for the numpunct<> facet to identify all numeric punctuation preferences, and also for the ctype<> facet to perform character classification.