tmp/tmp5c2nwbsy/{from.md → to.md}
RENAMED
|
@@ -553,19 +553,20 @@ mapped between.
|
|
| 553 |
The specializations required in Table
|
| 554 |
[[tab:localization.category.facets]] ([[locale.category]]) convert the
|
| 555 |
implementation-defined native character set.
|
| 556 |
`codecvt<char, char, mbstate_t>` implements a degenerate conversion; it
|
| 557 |
does not convert at all. The specialization `codecvt<char16_t,`
|
| 558 |
-
`char, mbstate_t>` converts between the UTF-16 and UTF-8 encoding
|
| 559 |
-
|
| 560 |
-
|
| 561 |
`codecvt<wchar_t,char,mbstate_t>` converts between the native character
|
| 562 |
sets for narrow and wide characters. Specializations on `mbstate_t`
|
| 563 |
perform conversion between encodings known to the library implementer.
|
| 564 |
Other encodings can be converted by specializing on a user-defined
|
| 565 |
-
`stateT` type.
|
| 566 |
-
to communicate to or from the specialized `do_in` or `do_out`
|
|
|
|
| 567 |
|
| 568 |
##### `codecvt` members <a id="locale.codecvt.members">[[locale.codecvt.members]]</a>
|
| 569 |
|
| 570 |
``` cpp
|
| 571 |
result out(stateT& state,
|
|
@@ -1379,12 +1380,12 @@ iter_type do_put(iter_type out, ios_base& str, char_type fill,
|
|
| 1379 |
`do_put(out, str, fill,`
|
| 1380 |
`(int)val)`, otherwise obtains a string `s` as if by
|
| 1381 |
|
| 1382 |
``` cpp
|
| 1383 |
string_type s =
|
| 1384 |
-
val ? use_facet<
|
| 1385 |
-
: use_facet<
|
| 1386 |
```
|
| 1387 |
|
| 1388 |
and then inserts each character `c` of `s` into `out` via `*out++ = c`
|
| 1389 |
and returns `out`.
|
| 1390 |
|
|
@@ -1912,11 +1913,11 @@ recognized as part of a valid year identifier.
|
|
| 1912 |
``` cpp
|
| 1913 |
iter_type do_get(iter_type s, iter_type end, ios_base& f,
|
| 1914 |
ios_base::iostate& err, tm* t, char format, char modifier) const;
|
| 1915 |
```
|
| 1916 |
|
| 1917 |
-
*Requires:* `t` shall
|
| 1918 |
|
| 1919 |
*Effects:* The function starts by evaluating `err = ios_base::goodbit`.
|
| 1920 |
It then reads characters starting at `s` until it encounters an error,
|
| 1921 |
or until it has extracted and assigned those `struct tm` members, and
|
| 1922 |
any remaining format characters, corresponding to a conversion directive
|
|
@@ -2495,11 +2496,11 @@ catalogs.
|
|
| 2495 |
|
| 2496 |
``` cpp
|
| 2497 |
namespace std {
|
| 2498 |
class messages_base {
|
| 2499 |
public:
|
| 2500 |
-
typedef
|
| 2501 |
};
|
| 2502 |
|
| 2503 |
template <class charT>
|
| 2504 |
class messages : public locale::facet, public messages_base {
|
| 2505 |
public:
|
|
|
|
| 553 |
The specializations required in Table
|
| 554 |
[[tab:localization.category.facets]] ([[locale.category]]) convert the
|
| 555 |
implementation-defined native character set.
|
| 556 |
`codecvt<char, char, mbstate_t>` implements a degenerate conversion; it
|
| 557 |
does not convert at all. The specialization `codecvt<char16_t,`
|
| 558 |
+
`char, mbstate_t>` converts between the UTF-16 and UTF-8 encoding forms,
|
| 559 |
+
and the specialization `codecvt` `<char32_t, char, mbstate_t>` converts
|
| 560 |
+
between the UTF-32 and UTF-8 encoding forms.
|
| 561 |
`codecvt<wchar_t,char,mbstate_t>` converts between the native character
|
| 562 |
sets for narrow and wide characters. Specializations on `mbstate_t`
|
| 563 |
perform conversion between encodings known to the library implementer.
|
| 564 |
Other encodings can be converted by specializing on a user-defined
|
| 565 |
+
`stateT` type. Objects of type `stateT` can contain any state that is
|
| 566 |
+
useful to communicate to or from the specialized `do_in` or `do_out`
|
| 567 |
+
members.
|
| 568 |
|
| 569 |
##### `codecvt` members <a id="locale.codecvt.members">[[locale.codecvt.members]]</a>
|
| 570 |
|
| 571 |
``` cpp
|
| 572 |
result out(stateT& state,
|
|
|
|
| 1380 |
`do_put(out, str, fill,`
|
| 1381 |
`(int)val)`, otherwise obtains a string `s` as if by
|
| 1382 |
|
| 1383 |
``` cpp
|
| 1384 |
string_type s =
|
| 1385 |
+
val ? use_facet<numpunct<charT>>(loc).truename()
|
| 1386 |
+
: use_facet<numpunct<charT>>(loc).falsename();
|
| 1387 |
```
|
| 1388 |
|
| 1389 |
and then inserts each character `c` of `s` into `out` via `*out++ = c`
|
| 1390 |
and returns `out`.
|
| 1391 |
|
|
|
|
| 1913 |
``` cpp
|
| 1914 |
iter_type do_get(iter_type s, iter_type end, ios_base& f,
|
| 1915 |
ios_base::iostate& err, tm* t, char format, char modifier) const;
|
| 1916 |
```
|
| 1917 |
|
| 1918 |
+
*Requires:* `t` shall point to an object.
|
| 1919 |
|
| 1920 |
*Effects:* The function starts by evaluating `err = ios_base::goodbit`.
|
| 1921 |
It then reads characters starting at `s` until it encounters an error,
|
| 1922 |
or until it has extracted and assigned those `struct tm` members, and
|
| 1923 |
any remaining format characters, corresponding to a conversion directive
|
|
|
|
| 2496 |
|
| 2497 |
``` cpp
|
| 2498 |
namespace std {
|
| 2499 |
class messages_base {
|
| 2500 |
public:
|
| 2501 |
+
typedef unspecified signed integer type catalog;
|
| 2502 |
};
|
| 2503 |
|
| 2504 |
template <class charT>
|
| 2505 |
class messages : public locale::facet, public messages_base {
|
| 2506 |
public:
|