Init
This commit is contained in:
35
cppdraft/char/traits/specializations/char.md
Normal file
35
cppdraft/char/traits/specializations/char.md
Normal file
@@ -0,0 +1,35 @@
|
||||
[char.traits.specializations.char]
|
||||
|
||||
# 27 Strings library [[strings]](./#strings)
|
||||
|
||||
## 27.2 Character traits [[char.traits]](char.traits#specializations.char)
|
||||
|
||||
### 27.2.4 char_traits specializations [[char.traits.specializations]](char.traits.specializations#char)
|
||||
|
||||
#### 27.2.4.2 struct char_traits<char> [char.traits.specializations.char]
|
||||
|
||||
[ð](#lib:char_traits)
|
||||
|
||||
namespace std {template<> struct char_traits<char> {using char_type = char; using int_type = int; using off_type = streamoff; using pos_type = streampos; using state_type = mbstate_t; using comparison_category = strong_ordering; static constexpr void assign(char_type& c1, const char_type& c2) noexcept; static constexpr bool eq(char_type c1, char_type c2) noexcept; static constexpr bool lt(char_type c1, char_type c2) noexcept; static constexpr int compare(const char_type* s1, const char_type* s2, size_t n); static constexpr size_t length(const char_type* s); static constexpr const char_type* find(const char_type* s, size_t n, const char_type& a); static constexpr char_type* move(char_type* s1, const char_type* s2, size_t n); static constexpr char_type* copy(char_type* s1, const char_type* s2, size_t n); static constexpr char_type* assign(char_type* s, size_t n, char_type a); static constexpr int_type not_eof(int_type c) noexcept; static constexpr char_type to_char_type(int_type c) noexcept; static constexpr int_type to_int_type(char_type c) noexcept; static constexpr bool eq_int_type(int_type c1, int_type c2) noexcept; static constexpr int_type eof() noexcept; };}
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L308)
|
||||
|
||||
The type mbstate_t is defined in [<cwchar>](cwchar.syn#header:%3ccwchar%3e "28.7.3 Header <cwchar> synopsis [cwchar.syn]") and can represent any of the conversion states that can occur in animplementation-defined set of supported multibyte
|
||||
character encoding rules[.](#1.sentence-1)
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L314)
|
||||
|
||||
The two-argument member assign is defined identically to the
|
||||
built-in operator =[.](#2.sentence-1)
|
||||
|
||||
The two-argument members eq and lt are defined identically to the built-in operators== and < for type unsigned char[.](#2.sentence-2)
|
||||
|
||||
[3](#3)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L320)
|
||||
|
||||
The membereof() returnsEOF[.](#3.sentence-1)
|
||||
27
cppdraft/char/traits/specializations/char16/t.md
Normal file
27
cppdraft/char/traits/specializations/char16/t.md
Normal file
@@ -0,0 +1,27 @@
|
||||
[char.traits.specializations.char16.t]
|
||||
|
||||
# 27 Strings library [[strings]](./#strings)
|
||||
|
||||
## 27.2 Character traits [[char.traits]](char.traits#specializations.char16.t)
|
||||
|
||||
### 27.2.4 char_traits specializations [[char.traits.specializations]](char.traits.specializations#char16.t)
|
||||
|
||||
#### 27.2.4.4 struct char_traits<char16_t> [char.traits.specializations.char16.t]
|
||||
|
||||
[ð](#lib:char_traits)
|
||||
|
||||
namespace std {template<> struct char_traits<char16_t> {using char_type = char16_t; using int_type = uint_least16_t; using off_type = streamoff; using pos_type = u16streampos; using state_type = mbstate_t; using comparison_category = strong_ordering; static constexpr void assign(char_type& c1, const char_type& c2) noexcept; static constexpr bool eq(char_type c1, char_type c2) noexcept; static constexpr bool lt(char_type c1, char_type c2) noexcept; static constexpr int compare(const char_type* s1, const char_type* s2, size_t n); static constexpr size_t length(const char_type* s); static constexpr const char_type* find(const char_type* s, size_t n, const char_type& a); static constexpr char_type* move(char_type* s1, const char_type* s2, size_t n); static constexpr char_type* copy(char_type* s1, const char_type* s2, size_t n); static constexpr char_type* assign(char_type* s, size_t n, char_type a); static constexpr int_type not_eof(int_type c) noexcept; static constexpr char_type to_char_type(int_type c) noexcept; static constexpr int_type to_int_type(char_type c) noexcept; static constexpr bool eq_int_type(int_type c1, int_type c2) noexcept; static constexpr int_type eof() noexcept; };}
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L405)
|
||||
|
||||
The two-argument members assign,eq, and lt are defined identically to
|
||||
the built-in operators =, ==, and<, respectively[.](#1.sentence-1)
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L411)
|
||||
|
||||
The member eof() returns animplementation-defined constant that cannot appear
|
||||
as a valid UTF-16 code unit[.](#2.sentence-1)
|
||||
27
cppdraft/char/traits/specializations/char32/t.md
Normal file
27
cppdraft/char/traits/specializations/char32/t.md
Normal file
@@ -0,0 +1,27 @@
|
||||
[char.traits.specializations.char32.t]
|
||||
|
||||
# 27 Strings library [[strings]](./#strings)
|
||||
|
||||
## 27.2 Character traits [[char.traits]](char.traits#specializations.char32.t)
|
||||
|
||||
### 27.2.4 char_traits specializations [[char.traits.specializations]](char.traits.specializations#char32.t)
|
||||
|
||||
#### 27.2.4.5 struct char_traits<char32_t> [char.traits.specializations.char32.t]
|
||||
|
||||
[ð](#lib:char_traits)
|
||||
|
||||
namespace std {template<> struct char_traits<char32_t> {using char_type = char32_t; using int_type = uint_least32_t; using off_type = streamoff; using pos_type = u32streampos; using state_type = mbstate_t; using comparison_category = strong_ordering; static constexpr void assign(char_type& c1, const char_type& c2) noexcept; static constexpr bool eq(char_type c1, char_type c2) noexcept; static constexpr bool lt(char_type c1, char_type c2) noexcept; static constexpr int compare(const char_type* s1, const char_type* s2, size_t n); static constexpr size_t length(const char_type* s); static constexpr const char_type* find(const char_type* s, size_t n, const char_type& a); static constexpr char_type* move(char_type* s1, const char_type* s2, size_t n); static constexpr char_type* copy(char_type* s1, const char_type* s2, size_t n); static constexpr char_type* assign(char_type* s, size_t n, char_type a); static constexpr int_type not_eof(int_type c) noexcept; static constexpr char_type to_char_type(int_type c) noexcept; static constexpr int_type to_int_type(char_type c) noexcept; static constexpr bool eq_int_type(int_type c1, int_type c2) noexcept; static constexpr int_type eof() noexcept; };}
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L451)
|
||||
|
||||
The two-argument members assign,eq, and lt are defined identically to
|
||||
the built-in operators =, ==, and<, respectively[.](#1.sentence-1)
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L457)
|
||||
|
||||
The member eof() returns animplementation-defined constant that cannot appear as a Unicode
|
||||
code point[.](#2.sentence-1)
|
||||
27
cppdraft/char/traits/specializations/char8/t.md
Normal file
27
cppdraft/char/traits/specializations/char8/t.md
Normal file
@@ -0,0 +1,27 @@
|
||||
[char.traits.specializations.char8.t]
|
||||
|
||||
# 27 Strings library [[strings]](./#strings)
|
||||
|
||||
## 27.2 Character traits [[char.traits]](char.traits#specializations.char8.t)
|
||||
|
||||
### 27.2.4 char_traits specializations [[char.traits.specializations]](char.traits.specializations#char8.t)
|
||||
|
||||
#### 27.2.4.3 struct char_traits<char8_t> [char.traits.specializations.char8.t]
|
||||
|
||||
[ð](#lib:char_traits)
|
||||
|
||||
namespace std {template<> struct char_traits<char8_t> {using char_type = char8_t; using int_type = unsigned int; using off_type = streamoff; using pos_type = u8streampos; using state_type = mbstate_t; using comparison_category = strong_ordering; static constexpr void assign(char_type& c1, const char_type& c2) noexcept; static constexpr bool eq(char_type c1, char_type c2) noexcept; static constexpr bool lt(char_type c1, char_type c2) noexcept; static constexpr int compare(const char_type* s1, const char_type* s2, size_t n); static constexpr size_t length(const char_type* s); static constexpr const char_type* find(const char_type* s, size_t n, const char_type& a); static constexpr char_type* move(char_type* s1, const char_type* s2, size_t n); static constexpr char_type* copy(char_type* s1, const char_type* s2, size_t n); static constexpr char_type* assign(char_type* s, size_t n, char_type a); static constexpr int_type not_eof(int_type c) noexcept; static constexpr char_type to_char_type(int_type c) noexcept; static constexpr int_type to_int_type(char_type c) noexcept; static constexpr bool eq_int_type(int_type c1, int_type c2) noexcept; static constexpr int_type eof() noexcept; };}
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L359)
|
||||
|
||||
The two-argument members assign, eq, and lt are defined identically to
|
||||
the built-in operators =, ==, and < respectively[.](#1.sentence-1)
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L364)
|
||||
|
||||
The member eof() returns animplementation-defined constant
|
||||
that cannot appear as a valid UTF-8 code unit[.](#2.sentence-1)
|
||||
20
cppdraft/char/traits/specializations/general.md
Normal file
20
cppdraft/char/traits/specializations/general.md
Normal file
@@ -0,0 +1,20 @@
|
||||
[char.traits.specializations.general]
|
||||
|
||||
# 27 Strings library [[strings]](./#strings)
|
||||
|
||||
## 27.2 Character traits [[char.traits]](char.traits#specializations.general)
|
||||
|
||||
### 27.2.4 char_traits specializations [[char.traits.specializations]](char.traits.specializations#general)
|
||||
|
||||
#### 27.2.4.1 General [char.traits.specializations.general]
|
||||
|
||||
[ð](#lib:char_traits)
|
||||
|
||||
namespace std {template<> struct char_traits<char>; template<> struct char_traits<char8_t>; template<> struct char_traits<char16_t>; template<> struct char_traits<char32_t>; template<> struct char_traits<wchar_t>;}
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L262)
|
||||
|
||||
The header [<string>](string.syn#header:%3cstring%3e "27.4.2 Header <string> synopsis [string.syn]") defines five specializations of the class templatechar_traits:char_traits<char>,char_traits<char8_t>,char_traits<char16_t>,char_traits<char32_t>,
|
||||
andchar_traits<wchar_t>[.](#1.sentence-1)
|
||||
29
cppdraft/char/traits/specializations/wchar/t.md
Normal file
29
cppdraft/char/traits/specializations/wchar/t.md
Normal file
@@ -0,0 +1,29 @@
|
||||
[char.traits.specializations.wchar.t]
|
||||
|
||||
# 27 Strings library [[strings]](./#strings)
|
||||
|
||||
## 27.2 Character traits [[char.traits]](char.traits#specializations.wchar.t)
|
||||
|
||||
### 27.2.4 char_traits specializations [[char.traits.specializations]](char.traits.specializations#wchar.t)
|
||||
|
||||
#### 27.2.4.6 struct char_traits<wchar_t> [char.traits.specializations.wchar.t]
|
||||
|
||||
[ð](#lib:char_traits)
|
||||
|
||||
namespace std {template<> struct char_traits<wchar_t> {using char_type = wchar_t; using int_type = wint_t; using off_type = streamoff; using pos_type = wstreampos; using state_type = mbstate_t; using comparison_category = strong_ordering; static constexpr void assign(char_type& c1, const char_type& c2) noexcept; static constexpr bool eq(char_type c1, char_type c2) noexcept; static constexpr bool lt(char_type c1, char_type c2) noexcept; static constexpr int compare(const char_type* s1, const char_type* s2, size_t n); static constexpr size_t length(const char_type* s); static constexpr const char_type* find(const char_type* s, size_t n, const char_type& a); static constexpr char_type* move(char_type* s1, const char_type* s2, size_t n); static constexpr char_type* copy(char_type* s1, const char_type* s2, size_t n); static constexpr char_type* assign(char_type* s, size_t n, char_type a); static constexpr int_type not_eof(int_type c) noexcept; static constexpr char_type to_char_type(int_type c) noexcept; static constexpr int_type to_int_type(char_type c) noexcept; static constexpr bool eq_int_type(int_type c1, int_type c2) noexcept; static constexpr int_type eof() noexcept; };}
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L497)
|
||||
|
||||
The two-argument membersassign,eq,
|
||||
andlt are defined identically
|
||||
to the built-in operators=,==,
|
||||
and<,
|
||||
respectively[.](#1.sentence-1)
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L511)
|
||||
|
||||
The membereof() returnsWEOF[.](#2.sentence-1)
|
||||
Reference in New Issue
Block a user