From Jason Turner

[text.encoding.overview]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpvx85o7s5/{from.md → to.md} +46 -0
tmp/tmpvx85o7s5/{from.md → to.md} RENAMED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### Overview <a id="text.encoding.overview">[[text.encoding.overview]]</a>
2
+
3
+ The class `text_encoding` describes an interface for accessing the IANA
4
+ Character Sets registry.
5
+
6
+ ``` cpp
7
+ namespace std {
8
+ struct text_encoding {
9
+ static constexpr size_t max_name_length = 63;
10
+
11
+ // [text.encoding.id], enumeration text_encoding::id
12
+ enum class id : int_least32_t {
13
+ see below
14
+ };
15
+ using enum id;
16
+
17
+ constexpr text_encoding() = default;
18
+ constexpr explicit text_encoding(string_view enc) noexcept;
19
+ constexpr text_encoding(id i) noexcept;
20
+
21
+ constexpr id mib() const noexcept;
22
+ constexpr const char* name() const noexcept;
23
+
24
+ // [text.encoding.aliases], class text_encoding::aliases_view
25
+ struct aliases_view;
26
+ constexpr aliases_view aliases() const noexcept;
27
+
28
+ friend constexpr bool operator==(const text_encoding& a,
29
+ const text_encoding& b) noexcept;
30
+ friend constexpr bool operator==(const text_encoding& encoding, id i) noexcept;
31
+
32
+ static consteval text_encoding literal() noexcept;
33
+ static text_encoding environment();
34
+ template<id i> static bool environment_is();
35
+
36
+ private:
37
+ id mib_ = id::unknown; // exposition only
38
+ char name_[max_name_length + 1] = {0}; // exposition only
39
+ static constexpr bool comp-name(string_view a, string_view b); // exposition only
40
+ };
41
+ }
42
+ ```
43
+
44
+ Class `text_encoding` is a trivially copyable type
45
+ [[term.trivially.copyable.type]].
46
+