tmp/tmp8tkk3ze5/{from.md → to.md}
RENAMED
|
@@ -1,7 +1,9 @@
|
|
| 1 |
## Deprecated convenience conversion interfaces <a id="depr.conversions">[[depr.conversions]]</a>
|
| 2 |
|
|
|
|
|
|
|
| 3 |
The header `<locale>` has the following additions:
|
| 4 |
|
| 5 |
``` cpp
|
| 6 |
namespace std {
|
| 7 |
template<class Codecvt, class Elem = wchar_t,
|
|
@@ -100,17 +102,10 @@ An object of this class template stores:
|
|
| 100 |
- `cvtptr` — a pointer to the allocated conversion object (which is
|
| 101 |
freed when the `wstring_convert` object is destroyed)
|
| 102 |
- `cvtstate` — a conversion state object
|
| 103 |
- `cvtcount` — a conversion count
|
| 104 |
|
| 105 |
-
``` cpp
|
| 106 |
-
using byte_string = basic_string<char, char_traits<char>, ByteAlloc>;
|
| 107 |
-
```
|
| 108 |
-
|
| 109 |
-
The type shall be a synonym for
|
| 110 |
-
`basic_string<char, char_traits<char>, ByteAlloc>`.
|
| 111 |
-
|
| 112 |
``` cpp
|
| 113 |
size_t converted() const noexcept;
|
| 114 |
```
|
| 115 |
|
| 116 |
*Returns:* `cvtcount`.
|
|
@@ -141,27 +136,15 @@ In all cases:
|
|
| 141 |
return the converted wide string. Otherwise, if the object was
|
| 142 |
constructed with a wide-error string, the member function shall return
|
| 143 |
the wide-error string. Otherwise, the member function throws an object
|
| 144 |
of class `range_error`.
|
| 145 |
|
| 146 |
-
``` cpp
|
| 147 |
-
using int_type = typename wide_string::traits_type::int_type;
|
| 148 |
-
```
|
| 149 |
-
|
| 150 |
-
The type shall be a synonym for `wide_string::traits_type::int_type`.
|
| 151 |
-
|
| 152 |
``` cpp
|
| 153 |
state_type state() const;
|
| 154 |
```
|
| 155 |
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
``` cpp
|
| 159 |
-
using state_type = typename Codecvt::state_type;
|
| 160 |
-
```
|
| 161 |
-
|
| 162 |
-
The type shall be a synonym for `Codecvt::state_type`.
|
| 163 |
|
| 164 |
``` cpp
|
| 165 |
byte_string to_bytes(Elem wchar);
|
| 166 |
byte_string to_bytes(const Elem* wptr);
|
| 167 |
byte_string to_bytes(const wide_string& wstr);
|
|
@@ -187,17 +170,10 @@ In all cases:
|
|
| 187 |
return the converted byte string. Otherwise, if the object was
|
| 188 |
constructed with a byte-error string, the member function shall return
|
| 189 |
the byte-error string. Otherwise, the member function shall throw an
|
| 190 |
object of class `range_error`.
|
| 191 |
|
| 192 |
-
``` cpp
|
| 193 |
-
using wide_string = basic_string<Elem, char_traits<Elem>, WideAlloc>;
|
| 194 |
-
```
|
| 195 |
-
|
| 196 |
-
The type shall be a synonym for
|
| 197 |
-
`basic_string<Elem, char_traits<Elem>, WideAlloc>`.
|
| 198 |
-
|
| 199 |
``` cpp
|
| 200 |
explicit wstring_convert(Codecvt* pcvt);
|
| 201 |
wstring_convert(Codecvt* pcvt, state_type state);
|
| 202 |
explicit wstring_convert(const byte_string& byte_err,
|
| 203 |
const wide_string& wide_err = wide_string());
|
|
@@ -291,16 +267,10 @@ streambuf* rdbuf(streambuf* bytebuf);
|
|
| 291 |
|
| 292 |
*Effects:* Stores `bytebuf` in `bufptr`.
|
| 293 |
|
| 294 |
*Returns:* The previous value of `bufptr`.
|
| 295 |
|
| 296 |
-
``` cpp
|
| 297 |
-
using state_type = typename Codecvt::state_type;
|
| 298 |
-
```
|
| 299 |
-
|
| 300 |
-
The type shall be a synonym for `Codecvt::state_type`.
|
| 301 |
-
|
| 302 |
``` cpp
|
| 303 |
explicit wbuffer_convert(
|
| 304 |
streambuf* bytebuf,
|
| 305 |
Codecvt* pcvt = new Codecvt,
|
| 306 |
state_type state = state_type());
|
|
|
|
| 1 |
## Deprecated convenience conversion interfaces <a id="depr.conversions">[[depr.conversions]]</a>
|
| 2 |
|
| 3 |
+
### General <a id="depr.conversions.general">[[depr.conversions.general]]</a>
|
| 4 |
+
|
| 5 |
The header `<locale>` has the following additions:
|
| 6 |
|
| 7 |
``` cpp
|
| 8 |
namespace std {
|
| 9 |
template<class Codecvt, class Elem = wchar_t,
|
|
|
|
| 102 |
- `cvtptr` — a pointer to the allocated conversion object (which is
|
| 103 |
freed when the `wstring_convert` object is destroyed)
|
| 104 |
- `cvtstate` — a conversion state object
|
| 105 |
- `cvtcount` — a conversion count
|
| 106 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
``` cpp
|
| 108 |
size_t converted() const noexcept;
|
| 109 |
```
|
| 110 |
|
| 111 |
*Returns:* `cvtcount`.
|
|
|
|
| 136 |
return the converted wide string. Otherwise, if the object was
|
| 137 |
constructed with a wide-error string, the member function shall return
|
| 138 |
the wide-error string. Otherwise, the member function throws an object
|
| 139 |
of class `range_error`.
|
| 140 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 141 |
``` cpp
|
| 142 |
state_type state() const;
|
| 143 |
```
|
| 144 |
|
| 145 |
+
*Returns:* `cvtstate`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 146 |
|
| 147 |
``` cpp
|
| 148 |
byte_string to_bytes(Elem wchar);
|
| 149 |
byte_string to_bytes(const Elem* wptr);
|
| 150 |
byte_string to_bytes(const wide_string& wstr);
|
|
|
|
| 170 |
return the converted byte string. Otherwise, if the object was
|
| 171 |
constructed with a byte-error string, the member function shall return
|
| 172 |
the byte-error string. Otherwise, the member function shall throw an
|
| 173 |
object of class `range_error`.
|
| 174 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 175 |
``` cpp
|
| 176 |
explicit wstring_convert(Codecvt* pcvt);
|
| 177 |
wstring_convert(Codecvt* pcvt, state_type state);
|
| 178 |
explicit wstring_convert(const byte_string& byte_err,
|
| 179 |
const wide_string& wide_err = wide_string());
|
|
|
|
| 267 |
|
| 268 |
*Effects:* Stores `bytebuf` in `bufptr`.
|
| 269 |
|
| 270 |
*Returns:* The previous value of `bufptr`.
|
| 271 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 272 |
``` cpp
|
| 273 |
explicit wbuffer_convert(
|
| 274 |
streambuf* bytebuf,
|
| 275 |
Codecvt* pcvt = new Codecvt,
|
| 276 |
state_type state = state_type());
|