[category.numeric.general] # 28 Text processing library [[text]](./#text) ## 28.3 Localization library [[localization]](localization#category.numeric.general) ### 28.3.4 Standard locale categories [[locale.categories]](locale.categories#category.numeric.general) #### 28.3.4.3 The numeric category [[category.numeric]](category.numeric#general) #### 28.3.4.3.1 General [category.numeric.general] [1](#1) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L2387) The classes num_get<> and num_put<> handle numeric formatting and parsing[.](#1.sentence-1) Virtual functions are provided for several numeric types[.](#1.sentence-2) Implementations may (but are not required to) delegate extraction of smaller types to extractors for larger types[.](#1.sentence-3)[223](#footnote-223 "Parsing "-1" correctly into, e.g., an unsigned short requires that the corresponding member get() at least extract the sign before delegating.") [2](#2) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L2399) All specifications of member functions for num_put and num_get in the subclauses of [[category.numeric]](category.numeric "28.3.4.3 The numeric category") only apply to the specializations required in Tables [91](locale.category#tab:locale.category.facets "Table 91: Locale category facets") and [92](locale.category#tab:locale.spec "Table 92: Required specializations") ([[locale.category]](locale.category "28.3.3.1.2.1 Type locale​::​category")), namelynum_get,num_get,num_get,num_put,num_put, andnum_put[.](#2.sentence-1) These specializations refer to the ios_base& argument for formatting specifications ([[locale.categories]](locale.categories "28.3.4 Standard 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[.](#2.sentence-2) [3](#3) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L2416) Extractor and inserter members of the standard iostreams usenum_get<> and num_put<> member functions for formatting and parsing numeric values ([[istream.formatted.reqmts]](istream.formatted.reqmts "31.7.5.3.1 Common requirements"), [[ostream.formatted.reqmts]](ostream.formatted.reqmts "31.7.6.3.1 Common requirements"))[.](#3.sentence-1) [223)](#footnote-223)[223)](#footnoteref-223) Parsing "-1" correctly into, e.g., an unsigned short requires that the corresponding member get() at least extract the sign before delegating[.](#footnote-223.sentence-1)