From Jason Turner

[char.traits.specializations.char]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp8yqvdvw1/{from.md → to.md} +10 -10
tmp/tmp8yqvdvw1/{from.md → to.md} RENAMED
@@ -1,23 +1,23 @@
1
  #### `struct char_traits<char>` <a id="char.traits.specializations.char">[[char.traits.specializations.char]]</a>
2
 
3
  ``` cpp
4
  namespace std {
5
  template<> struct char_traits<char> {
6
- typedef char char_type;
7
- typedef int int_type;
8
- typedef streamoff off_type;
9
- typedef streampos pos_type;
10
- typedef mbstate_t state_type;
11
 
12
- static void assign(char_type& c1, const char_type& c2) noexcept;
13
  static constexpr bool eq(char_type c1, char_type c2) noexcept;
14
  static constexpr bool lt(char_type c1, char_type c2) noexcept;
15
 
16
- static int compare(const char_type* s1, const char_type* s2, size_t n);
17
- static size_t length(const char_type* s);
18
- static const char_type* find(const char_type* s, size_t n,
19
  const char_type& a);
20
  static char_type* move(char_type* s1, const char_type* s2, size_t n);
21
  static char_type* copy(char_type* s1, const char_type* s2, size_t n);
22
  static char_type* assign(char_type* s, size_t n, char_type a);
23
 
@@ -47,9 +47,9 @@ the conversion states that can occur in an *implementation-defined* set
47
  of supported multibyte character encoding rules.
48
 
49
  The two-argument member `assign` shall be defined identically to the
50
  built-in operator `=`. The two-argument members `eq` and `lt` shall be
51
  defined identically to the built-in operators `==` and `<` for type
52
- `unsigned` `char`.
53
 
54
  The member `eof()` shall return `EOF`.
55
 
 
1
  #### `struct char_traits<char>` <a id="char.traits.specializations.char">[[char.traits.specializations.char]]</a>
2
 
3
  ``` cpp
4
  namespace std {
5
  template<> struct char_traits<char> {
6
+ using char_type = char;
7
+ using int_type = int;
8
+ using off_type = streamoff;
9
+ using pos_type = streampos;
10
+ using state_type = mbstate_t;
11
 
12
+ static constexpr void assign(char_type& c1, const char_type& c2) noexcept;
13
  static constexpr bool eq(char_type c1, char_type c2) noexcept;
14
  static constexpr bool lt(char_type c1, char_type c2) noexcept;
15
 
16
+ static constexpr int compare(const char_type* s1, const char_type* s2, size_t n);
17
+ static constexpr size_t length(const char_type* s);
18
+ static constexpr const char_type* find(const char_type* s, size_t n,
19
  const char_type& a);
20
  static char_type* move(char_type* s1, const char_type* s2, size_t n);
21
  static char_type* copy(char_type* s1, const char_type* s2, size_t n);
22
  static char_type* assign(char_type* s, size_t n, char_type a);
23
 
 
47
  of supported multibyte character encoding rules.
48
 
49
  The two-argument member `assign` shall be defined identically to the
50
  built-in operator `=`. The two-argument members `eq` and `lt` shall be
51
  defined identically to the built-in operators `==` and `<` for type
52
+ `unsigned char`.
53
 
54
  The member `eof()` shall return `EOF`.
55