tmp/tmpp0qyp2e3/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### `struct char_traits<char16_t>` <a id="char.traits.specializations.char16.t">[[char.traits.specializations.char16.t]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
namespace std {
|
| 5 |
+
template<> struct char_traits<char16_t> {
|
| 6 |
+
using char_type = char16_t;
|
| 7 |
+
using int_type = uint_least16_t;
|
| 8 |
+
using off_type = streamoff;
|
| 9 |
+
using pos_type = u16streampos;
|
| 10 |
+
using state_type = mbstate_t;
|
| 11 |
+
using comparison_category = strong_ordering;
|
| 12 |
+
|
| 13 |
+
static constexpr void assign(char_type& c1, const char_type& c2) noexcept;
|
| 14 |
+
static constexpr bool eq(char_type c1, char_type c2) noexcept;
|
| 15 |
+
static constexpr bool lt(char_type c1, char_type c2) noexcept;
|
| 16 |
+
|
| 17 |
+
static constexpr int compare(const char_type* s1, const char_type* s2, size_t n);
|
| 18 |
+
static constexpr size_t length(const char_type* s);
|
| 19 |
+
static constexpr const char_type* find(const char_type* s, size_t n,
|
| 20 |
+
const char_type& a);
|
| 21 |
+
static constexpr char_type* move(char_type* s1, const char_type* s2, size_t n);
|
| 22 |
+
static constexpr char_type* copy(char_type* s1, const char_type* s2, size_t n);
|
| 23 |
+
static constexpr char_type* assign(char_type* s, size_t n, char_type a);
|
| 24 |
+
|
| 25 |
+
static constexpr int_type not_eof(int_type c) noexcept;
|
| 26 |
+
static constexpr char_type to_char_type(int_type c) noexcept;
|
| 27 |
+
static constexpr int_type to_int_type(char_type c) noexcept;
|
| 28 |
+
static constexpr bool eq_int_type(int_type c1, int_type c2) noexcept;
|
| 29 |
+
static constexpr int_type eof() noexcept;
|
| 30 |
+
};
|
| 31 |
+
}
|
| 32 |
+
```
|
| 33 |
+
|
| 34 |
+
The two-argument members `assign`, `eq`, and `lt` are defined
|
| 35 |
+
identically to the built-in operators `=`, `==`, and `<`, respectively.
|
| 36 |
+
|
| 37 |
+
The member `eof()` returns an *implementation-defined* constant that
|
| 38 |
+
cannot appear as a valid UTF-16 code unit.
|
| 39 |
+
|