45 lines
1.4 KiB
Markdown
45 lines
1.4 KiB
Markdown
[locale.id]
|
||
|
||
# 28 Text processing library [[text]](./#text)
|
||
|
||
## 28.3 Localization library [[localization]](localization#locale.id)
|
||
|
||
### 28.3.3 Locales [[locales]](locales#locale.id)
|
||
|
||
#### 28.3.3.1 Class locale [[locale]](locale#id)
|
||
|
||
#### 28.3.3.1.2 Types [[locale.types]](locale.types#locale.id)
|
||
|
||
#### 28.3.3.1.2.3 Class locale::id [locale.id]
|
||
|
||
[ð](#lib:locale,id)
|
||
|
||
namespace std {class locale::id {public: id(); void operator=(const id&) = delete;
|
||
id(const id&) = delete; };}
|
||
|
||
[1](#1)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L840)
|
||
|
||
The class locale::id provides
|
||
identification of a locale facet interface,
|
||
used as an index for lookup and to encapsulate initialization[.](#1.sentence-1)
|
||
|
||
[2](#2)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L845)
|
||
|
||
[*Note [1](#note-1)*:
|
||
|
||
Because facets are used by iostreams,
|
||
potentially while static constructors are running,
|
||
their initialization cannot depend on programmed static initialization[.](#2.sentence-1)
|
||
|
||
One initialization strategy is for locale to initialize each facet's id member
|
||
the first time an instance of the facet is installed into a locale[.](#2.sentence-2)
|
||
|
||
This depends only on static storage being zero
|
||
before constructors run ([[basic.start.static]](basic.start.static "6.10.3.2 Static initialization"))[.](#2.sentence-3)
|
||
|
||
â *end note*]
|