[locale.category]
# 28 Text processing library [[text]](./#text)
## 28.3 Localization library [[localization]](localization#locale.category)
### 28.3.3 Locales [[locales]](locales#locale.category)
#### 28.3.3.1 Class locale [[locale]](locale#category)
#### 28.3.3.1.2 Types [[locale.types]](locale.types#locale.category)
#### 28.3.3.1.2.1 Type locale::category [locale.category]
[ð](#lib:locale,category)
`using category = int;
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L633)
*Valid* category values
include the locale member bitmask elementscollate,ctype,monetary,numeric,time,
andmessages,
each of which represents a single locale category[.](#1.sentence-1)
In addition, locale member bitmask constant none is defined as zero and represents no category[.](#1.sentence-2)
And locale member bitmask constant all is defined such that the expression(collate | ctype | monetary | numeric | time | messages | all) == all is true,
and represents the union of all categories[.](#1.sentence-3)
Further, the expression (X | Y),
where X and Y each represent a single category,
represents the union of the two categories[.](#1.sentence-4)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L657)
locale member functions
expecting a category argument
require one of the category values defined above, or
the union of two or more such values[.](#2.sentence-1)
Such a category value identifies a set of locale categories[.](#2.sentence-2)
Each locale category, in turn, identifies a set of locale facets,
including at least those shown in Table [91](#tab:locale.category.facets "Table 91: Locale category facets")[.](#2.sentence-3)
Table [91](#tab:locale.category.facets) — Locale category facets [[tab:locale.category.facets]](./tab:locale.category.facets)
| [ð](#tab:locale.category.facets-row-1)
**Category** | **Includes facets** |
| --- | --- |
| [ð](#tab:locale.category.facets-row-2)
collate | collate, collate |
| [ð](#tab:locale.category.facets-row-3)
ctype | ctype, ctype |
| [ð](#tab:locale.category.facets-row-4) | codecvt |
| [ð](#tab:locale.category.facets-row-5) | codecvt |
| [ð](#tab:locale.category.facets-row-6)
monetary | moneypunct, moneypunct |
| [ð](#tab:locale.category.facets-row-7) | moneypunct, moneypunct |
| [ð](#tab:locale.category.facets-row-8) | money_get, money_get |
| [ð](#tab:locale.category.facets-row-9) | money_put, money_put |
| [ð](#tab:locale.category.facets-row-10)
numeric | numpunct, numpunct |
| [ð](#tab:locale.category.facets-row-11) | num_get, num_get |
| [ð](#tab:locale.category.facets-row-12) | num_put, num_put |
| [ð](#tab:locale.category.facets-row-13)
time | time_get, time_get |
| [ð](#tab:locale.category.facets-row-14) | time_put, time_put |
| [ð](#tab:locale.category.facets-row-15)
messages | messages, messages |
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L686)
For any locale loc either constructed, or returned by locale::classic(),
and any facet Facet shown in Table [91](#tab:locale.category.facets "Table 91: Locale category facets"),has_facet(loc) is true[.](#3.sentence-1)
Each locale member function
which takes a locale::category argument
operates on the corresponding set of facets[.](#3.sentence-2)
[4](#4)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L695)
An implementation is required to provide those specializations
for facet templates identified as members of a category, and
for those shown in Table [92](#tab:locale.spec "Table 92: Required specializations")[.](#4.sentence-1)
Table [92](#tab:locale.spec) — Required specializations [[tab:locale.spec]](./tab:locale.spec)
| [ð](#tab:locale.spec-row-1)
**Category** | **Includes facets** |
| --- | --- |
| [ð](#tab:locale.spec-row-2)
collate | collate_byname, collate_byname |
| [ð](#tab:locale.spec-row-3)
ctype | ctype_byname, ctype_byname |
| [ð](#tab:locale.spec-row-4) | codecvt_byname |
| [ð](#tab:locale.spec-row-5) | codecvt_byname |
| [ð](#tab:locale.spec-row-6)
monetary | moneypunct_byname |
| [ð](#tab:locale.spec-row-7) | moneypunct_byname |
| [ð](#tab:locale.spec-row-8) | money_get |
| [ð](#tab:locale.spec-row-9) | money_put |
| [ð](#tab:locale.spec-row-10)
numeric | numpunct_byname, numpunct_byname |
| [ð](#tab:locale.spec-row-11) | num_get, num_put |
| [ð](#tab:locale.spec-row-12)
time | time_get |
| [ð](#tab:locale.spec-row-13) | time_get_byname |
| [ð](#tab:locale.spec-row-14) | time_get |
| [ð](#tab:locale.spec-row-15) | time_get_byname |
| [ð](#tab:locale.spec-row-16) | time_put |
| [ð](#tab:locale.spec-row-17) | time_put_byname |
| [ð](#tab:locale.spec-row-18) | time_put |
| [ð](#tab:locale.spec-row-19) | time_put_byname |
| [ð](#tab:locale.spec-row-20)
messages | messages_byname, messages_byname |
[5](#5)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L726)
The provided implementation of members of
facets num_get and num_put calls use_facet(l) only for facet F of
types numpunct and ctype,
and for locale l the value obtained by calling member getloc() on the ios_base& argument to these functions[.](#5.sentence-1)
[6](#6)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L734)
In declarations of facets,
a template parameter with name InputIterator or OutputIterator indicates the set of all possible specializations on parameters that meet the*Cpp17InputIterator* requirements or*Cpp17OutputIterator* requirements,
respectively ([[iterator.requirements]](iterator.requirements "24.3 Iterator requirements"))[.](#6.sentence-1)
A template parameter with name C represents
the set of types containing char, wchar_t, and any otherimplementation-defined
character container types ([[defns.character.container]](defns.character.container "3.10 character container type"))
that meet the requirements for a character
on which any of the iostream components can be instantiated[.](#6.sentence-2)
A template parameter with name International represents the set of all possible specializations on a bool parameter[.](#6.sentence-3)