Files
2025-10-25 03:02:53 +03:00

45 lines
1.4 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[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.2Static initialization"))[.](#2.sentence-3)
— *end note*]