From Jason Turner

[char.traits.general]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp8lj28l50/{from.md → to.md} +23 -0
tmp/tmp8lj28l50/{from.md → to.md} RENAMED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### General <a id="char.traits.general">[[char.traits.general]]</a>
2
+
3
+ Subclause [[char.traits]] defines requirements on classes representing
4
+ *character traits*, and defines a class template `char_traits<charT>`,
5
+ along with five specializations, `char_traits<char>`,
6
+ `char_traits<char8_t>`, `char_traits<char16_t>`,
7
+ `char_traits<char32_t>`, and `char_traits<wchar_t>`, that meet those
8
+ requirements.
9
+
10
+ Most classes specified in [[string.classes]], [[string.view]], and
11
+ [[input.output]] need a set of related types and functions to complete
12
+ the definition of their semantics. These types and functions are
13
+ provided as a set of member *typedef-name*s and functions in the
14
+ template parameter `traits` used by each such template. Subclause
15
+ [[char.traits]] defines the semantics of these members.
16
+
17
+ To specialize those templates to generate a string, string view, or
18
+ iostream class to handle a particular character container type
19
+ [[defns.character.container]] `C`, that and its related character traits
20
+ class `X` are passed as a pair of parameters to the string, string view,
21
+ or iostream template as parameters `charT` and `traits`. If
22
+ `X::char_type` is not the same type as `C`, the program is ill-formed.
23
+