1// -*- C++ -*- 2//===----------------------------------------------------------------------===// 3// 4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 5// See https://llvm.org/LICENSE.txt for license information. 6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7// 8//===----------------------------------------------------------------------===// 9 10#ifndef _LIBCPP_CODECVT 11#define _LIBCPP_CODECVT 12 13/* 14 codecvt synopsis 15 16namespace std 17{ 18 19enum codecvt_mode 20{ 21 consume_header = 4, 22 generate_header = 2, 23 little_endian = 1 24}; 25 26template <class Elem, unsigned long Maxcode = 0x10ffff, 27 codecvt_mode Mode = (codecvt_mode)0> 28class codecvt_utf8 29 : public codecvt<Elem, char, mbstate_t> 30{ 31 explicit codecvt_utf8(size_t refs = 0); 32 ~codecvt_utf8(); 33}; 34 35template <class Elem, unsigned long Maxcode = 0x10ffff, 36 codecvt_mode Mode = (codecvt_mode)0> 37class codecvt_utf16 38 : public codecvt<Elem, char, mbstate_t> 39{ 40 explicit codecvt_utf16(size_t refs = 0); 41 ~codecvt_utf16(); 42}; 43 44template <class Elem, unsigned long Maxcode = 0x10ffff, 45 codecvt_mode Mode = (codecvt_mode)0> 46class codecvt_utf8_utf16 47 : public codecvt<Elem, char, mbstate_t> 48{ 49 explicit codecvt_utf8_utf16(size_t refs = 0); 50 ~codecvt_utf8_utf16(); 51}; 52 53} // std 54 55*/ 56 57#include <__config> 58#include <__locale> 59#include <version> 60 61#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 62#pragma GCC system_header 63#endif 64 65_LIBCPP_BEGIN_NAMESPACE_STD 66 67enum codecvt_mode 68{ 69 consume_header = 4, 70 generate_header = 2, 71 little_endian = 1 72}; 73 74// codecvt_utf8 75 76template <class _Elem> class __codecvt_utf8; 77 78#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS 79template <> 80class _LIBCPP_TYPE_VIS __codecvt_utf8<wchar_t> 81 : public codecvt<wchar_t, char, mbstate_t> 82{ 83 unsigned long _Maxcode_; 84 codecvt_mode _Mode_; 85public: 86 typedef wchar_t intern_type; 87 typedef char extern_type; 88 typedef mbstate_t state_type; 89 90 _LIBCPP_INLINE_VISIBILITY 91 explicit __codecvt_utf8(size_t __refs, unsigned long _Maxcode, 92 codecvt_mode _Mode) 93 : codecvt<wchar_t, char, mbstate_t>(__refs), _Maxcode_(_Maxcode), 94 _Mode_(_Mode) {} 95protected: 96 virtual result 97 do_out(state_type& __st, 98 const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt, 99 extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; 100 virtual result 101 do_in(state_type& __st, 102 const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt, 103 intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const; 104 virtual result 105 do_unshift(state_type& __st, 106 extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; 107 virtual int do_encoding() const _NOEXCEPT; 108 virtual bool do_always_noconv() const _NOEXCEPT; 109 virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, 110 size_t __mx) const; 111 virtual int do_max_length() const _NOEXCEPT; 112}; 113#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS 114 115_LIBCPP_SUPPRESS_DEPRECATED_PUSH 116template <> 117class _LIBCPP_TYPE_VIS __codecvt_utf8<char16_t> 118 : public codecvt<char16_t, char, mbstate_t> 119{ 120 unsigned long _Maxcode_; 121 codecvt_mode _Mode_; 122public: 123 typedef char16_t intern_type; 124 typedef char extern_type; 125 typedef mbstate_t state_type; 126 127 _LIBCPP_INLINE_VISIBILITY 128 explicit __codecvt_utf8(size_t __refs, unsigned long _Maxcode, 129 codecvt_mode _Mode) 130 : codecvt<char16_t, char, mbstate_t>(__refs), _Maxcode_(_Maxcode), 131 _Mode_(_Mode) {} 132_LIBCPP_SUPPRESS_DEPRECATED_POP 133 134protected: 135 virtual result 136 do_out(state_type& __st, 137 const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt, 138 extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; 139 virtual result 140 do_in(state_type& __st, 141 const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt, 142 intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const; 143 virtual result 144 do_unshift(state_type& __st, 145 extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; 146 virtual int do_encoding() const _NOEXCEPT; 147 virtual bool do_always_noconv() const _NOEXCEPT; 148 virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, 149 size_t __mx) const; 150 virtual int do_max_length() const _NOEXCEPT; 151}; 152 153_LIBCPP_SUPPRESS_DEPRECATED_PUSH 154template <> 155class _LIBCPP_TYPE_VIS __codecvt_utf8<char32_t> 156 : public codecvt<char32_t, char, mbstate_t> 157{ 158 unsigned long _Maxcode_; 159 codecvt_mode _Mode_; 160public: 161 typedef char32_t intern_type; 162 typedef char extern_type; 163 typedef mbstate_t state_type; 164 165 _LIBCPP_INLINE_VISIBILITY 166 explicit __codecvt_utf8(size_t __refs, unsigned long _Maxcode, 167 codecvt_mode _Mode) 168 : codecvt<char32_t, char, mbstate_t>(__refs), _Maxcode_(_Maxcode), 169 _Mode_(_Mode) {} 170_LIBCPP_SUPPRESS_DEPRECATED_POP 171 172protected: 173 virtual result 174 do_out(state_type& __st, 175 const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt, 176 extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; 177 virtual result 178 do_in(state_type& __st, 179 const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt, 180 intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const; 181 virtual result 182 do_unshift(state_type& __st, 183 extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; 184 virtual int do_encoding() const _NOEXCEPT; 185 virtual bool do_always_noconv() const _NOEXCEPT; 186 virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, 187 size_t __mx) const; 188 virtual int do_max_length() const _NOEXCEPT; 189}; 190 191template <class _Elem, unsigned long _Maxcode = 0x10ffff, 192 codecvt_mode _Mode = (codecvt_mode)0> 193class _LIBCPP_TEMPLATE_VIS codecvt_utf8 194 : public __codecvt_utf8<_Elem> 195{ 196public: 197 _LIBCPP_INLINE_VISIBILITY 198 explicit codecvt_utf8(size_t __refs = 0) 199 : __codecvt_utf8<_Elem>(__refs, _Maxcode, _Mode) {} 200 201 _LIBCPP_INLINE_VISIBILITY 202 ~codecvt_utf8() {} 203}; 204 205// codecvt_utf16 206 207template <class _Elem, bool _LittleEndian> class __codecvt_utf16; 208 209#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS 210template <> 211class _LIBCPP_TYPE_VIS __codecvt_utf16<wchar_t, false> 212 : public codecvt<wchar_t, char, mbstate_t> 213{ 214 unsigned long _Maxcode_; 215 codecvt_mode _Mode_; 216public: 217 typedef wchar_t intern_type; 218 typedef char extern_type; 219 typedef mbstate_t state_type; 220 221 _LIBCPP_INLINE_VISIBILITY 222 explicit __codecvt_utf16(size_t __refs, unsigned long _Maxcode, 223 codecvt_mode _Mode) 224 : codecvt<wchar_t, char, mbstate_t>(__refs), _Maxcode_(_Maxcode), 225 _Mode_(_Mode) {} 226protected: 227 virtual result 228 do_out(state_type& __st, 229 const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt, 230 extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; 231 virtual result 232 do_in(state_type& __st, 233 const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt, 234 intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const; 235 virtual result 236 do_unshift(state_type& __st, 237 extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; 238 virtual int do_encoding() const _NOEXCEPT; 239 virtual bool do_always_noconv() const _NOEXCEPT; 240 virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, 241 size_t __mx) const; 242 virtual int do_max_length() const _NOEXCEPT; 243}; 244 245template <> 246class _LIBCPP_TYPE_VIS __codecvt_utf16<wchar_t, true> 247 : public codecvt<wchar_t, char, mbstate_t> 248{ 249 unsigned long _Maxcode_; 250 codecvt_mode _Mode_; 251public: 252 typedef wchar_t intern_type; 253 typedef char extern_type; 254 typedef mbstate_t state_type; 255 256 _LIBCPP_INLINE_VISIBILITY 257 explicit __codecvt_utf16(size_t __refs, unsigned long _Maxcode, 258 codecvt_mode _Mode) 259 : codecvt<wchar_t, char, mbstate_t>(__refs), _Maxcode_(_Maxcode), 260 _Mode_(_Mode) {} 261protected: 262 virtual result 263 do_out(state_type& __st, 264 const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt, 265 extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; 266 virtual result 267 do_in(state_type& __st, 268 const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt, 269 intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const; 270 virtual result 271 do_unshift(state_type& __st, 272 extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; 273 virtual int do_encoding() const _NOEXCEPT; 274 virtual bool do_always_noconv() const _NOEXCEPT; 275 virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, 276 size_t __mx) const; 277 virtual int do_max_length() const _NOEXCEPT; 278}; 279#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS 280 281_LIBCPP_SUPPRESS_DEPRECATED_PUSH 282template <> 283class _LIBCPP_TYPE_VIS __codecvt_utf16<char16_t, false> 284 : public codecvt<char16_t, char, mbstate_t> 285{ 286 unsigned long _Maxcode_; 287 codecvt_mode _Mode_; 288public: 289 typedef char16_t intern_type; 290 typedef char extern_type; 291 typedef mbstate_t state_type; 292 293 _LIBCPP_INLINE_VISIBILITY 294 explicit __codecvt_utf16(size_t __refs, unsigned long _Maxcode, 295 codecvt_mode _Mode) 296 : codecvt<char16_t, char, mbstate_t>(__refs), _Maxcode_(_Maxcode), 297 _Mode_(_Mode) {} 298_LIBCPP_SUPPRESS_DEPRECATED_POP 299 300protected: 301 virtual result 302 do_out(state_type& __st, 303 const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt, 304 extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; 305 virtual result 306 do_in(state_type& __st, 307 const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt, 308 intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const; 309 virtual result 310 do_unshift(state_type& __st, 311 extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; 312 virtual int do_encoding() const _NOEXCEPT; 313 virtual bool do_always_noconv() const _NOEXCEPT; 314 virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, 315 size_t __mx) const; 316 virtual int do_max_length() const _NOEXCEPT; 317}; 318 319_LIBCPP_SUPPRESS_DEPRECATED_PUSH 320template <> 321class _LIBCPP_TYPE_VIS __codecvt_utf16<char16_t, true> 322 : public codecvt<char16_t, char, mbstate_t> 323{ 324 unsigned long _Maxcode_; 325 codecvt_mode _Mode_; 326public: 327 typedef char16_t intern_type; 328 typedef char extern_type; 329 typedef mbstate_t state_type; 330 331 _LIBCPP_INLINE_VISIBILITY 332 explicit __codecvt_utf16(size_t __refs, unsigned long _Maxcode, 333 codecvt_mode _Mode) 334 : codecvt<char16_t, char, mbstate_t>(__refs), _Maxcode_(_Maxcode), 335 _Mode_(_Mode) {} 336_LIBCPP_SUPPRESS_DEPRECATED_POP 337 338protected: 339 virtual result 340 do_out(state_type& __st, 341 const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt, 342 extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; 343 virtual result 344 do_in(state_type& __st, 345 const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt, 346 intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const; 347 virtual result 348 do_unshift(state_type& __st, 349 extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; 350 virtual int do_encoding() const _NOEXCEPT; 351 virtual bool do_always_noconv() const _NOEXCEPT; 352 virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, 353 size_t __mx) const; 354 virtual int do_max_length() const _NOEXCEPT; 355}; 356 357_LIBCPP_SUPPRESS_DEPRECATED_PUSH 358template <> 359class _LIBCPP_TYPE_VIS __codecvt_utf16<char32_t, false> 360 : public codecvt<char32_t, char, mbstate_t> 361{ 362 unsigned long _Maxcode_; 363 codecvt_mode _Mode_; 364public: 365 typedef char32_t intern_type; 366 typedef char extern_type; 367 typedef mbstate_t state_type; 368 369 _LIBCPP_INLINE_VISIBILITY 370 explicit __codecvt_utf16(size_t __refs, unsigned long _Maxcode, 371 codecvt_mode _Mode) 372 : codecvt<char32_t, char, mbstate_t>(__refs), _Maxcode_(_Maxcode), 373 _Mode_(_Mode) {} 374_LIBCPP_SUPPRESS_DEPRECATED_POP 375 376protected: 377 virtual result 378 do_out(state_type& __st, 379 const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt, 380 extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; 381 virtual result 382 do_in(state_type& __st, 383 const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt, 384 intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const; 385 virtual result 386 do_unshift(state_type& __st, 387 extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; 388 virtual int do_encoding() const _NOEXCEPT; 389 virtual bool do_always_noconv() const _NOEXCEPT; 390 virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, 391 size_t __mx) const; 392 virtual int do_max_length() const _NOEXCEPT; 393}; 394 395_LIBCPP_SUPPRESS_DEPRECATED_PUSH 396template <> 397class _LIBCPP_TYPE_VIS __codecvt_utf16<char32_t, true> 398 : public codecvt<char32_t, char, mbstate_t> 399{ 400 unsigned long _Maxcode_; 401 codecvt_mode _Mode_; 402public: 403 typedef char32_t intern_type; 404 typedef char extern_type; 405 typedef mbstate_t state_type; 406 407 _LIBCPP_INLINE_VISIBILITY 408 explicit __codecvt_utf16(size_t __refs, unsigned long _Maxcode, 409 codecvt_mode _Mode) 410 : codecvt<char32_t, char, mbstate_t>(__refs), _Maxcode_(_Maxcode), 411 _Mode_(_Mode) {} 412_LIBCPP_SUPPRESS_DEPRECATED_POP 413 414protected: 415 virtual result 416 do_out(state_type& __st, 417 const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt, 418 extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; 419 virtual result 420 do_in(state_type& __st, 421 const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt, 422 intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const; 423 virtual result 424 do_unshift(state_type& __st, 425 extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; 426 virtual int do_encoding() const _NOEXCEPT; 427 virtual bool do_always_noconv() const _NOEXCEPT; 428 virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, 429 size_t __mx) const; 430 virtual int do_max_length() const _NOEXCEPT; 431}; 432 433template <class _Elem, unsigned long _Maxcode = 0x10ffff, 434 codecvt_mode _Mode = (codecvt_mode)0> 435class _LIBCPP_TEMPLATE_VIS codecvt_utf16 436 : public __codecvt_utf16<_Elem, _Mode & little_endian> 437{ 438public: 439 _LIBCPP_INLINE_VISIBILITY 440 explicit codecvt_utf16(size_t __refs = 0) 441 : __codecvt_utf16<_Elem, _Mode & little_endian>(__refs, _Maxcode, _Mode) {} 442 443 _LIBCPP_INLINE_VISIBILITY 444 ~codecvt_utf16() {} 445}; 446 447// codecvt_utf8_utf16 448 449template <class _Elem> class __codecvt_utf8_utf16; 450 451#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS 452template <> 453class _LIBCPP_TYPE_VIS __codecvt_utf8_utf16<wchar_t> 454 : public codecvt<wchar_t, char, mbstate_t> 455{ 456 unsigned long _Maxcode_; 457 codecvt_mode _Mode_; 458public: 459 typedef wchar_t intern_type; 460 typedef char extern_type; 461 typedef mbstate_t state_type; 462 463 _LIBCPP_INLINE_VISIBILITY 464 explicit __codecvt_utf8_utf16(size_t __refs, unsigned long _Maxcode, 465 codecvt_mode _Mode) 466 : codecvt<wchar_t, char, mbstate_t>(__refs), _Maxcode_(_Maxcode), 467 _Mode_(_Mode) {} 468protected: 469 virtual result 470 do_out(state_type& __st, 471 const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt, 472 extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; 473 virtual result 474 do_in(state_type& __st, 475 const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt, 476 intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const; 477 virtual result 478 do_unshift(state_type& __st, 479 extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; 480 virtual int do_encoding() const _NOEXCEPT; 481 virtual bool do_always_noconv() const _NOEXCEPT; 482 virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, 483 size_t __mx) const; 484 virtual int do_max_length() const _NOEXCEPT; 485}; 486#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS 487 488_LIBCPP_SUPPRESS_DEPRECATED_PUSH 489template <> 490class _LIBCPP_TYPE_VIS __codecvt_utf8_utf16<char32_t> 491 : public codecvt<char32_t, char, mbstate_t> 492{ 493 unsigned long _Maxcode_; 494 codecvt_mode _Mode_; 495public: 496 typedef char32_t intern_type; 497 typedef char extern_type; 498 typedef mbstate_t state_type; 499 500 _LIBCPP_INLINE_VISIBILITY 501 explicit __codecvt_utf8_utf16(size_t __refs, unsigned long _Maxcode, 502 codecvt_mode _Mode) 503 : codecvt<char32_t, char, mbstate_t>(__refs), _Maxcode_(_Maxcode), 504 _Mode_(_Mode) {} 505_LIBCPP_SUPPRESS_DEPRECATED_POP 506 507protected: 508 virtual result 509 do_out(state_type& __st, 510 const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt, 511 extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; 512 virtual result 513 do_in(state_type& __st, 514 const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt, 515 intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const; 516 virtual result 517 do_unshift(state_type& __st, 518 extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; 519 virtual int do_encoding() const _NOEXCEPT; 520 virtual bool do_always_noconv() const _NOEXCEPT; 521 virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, 522 size_t __mx) const; 523 virtual int do_max_length() const _NOEXCEPT; 524}; 525 526_LIBCPP_SUPPRESS_DEPRECATED_PUSH 527template <> 528class _LIBCPP_TYPE_VIS __codecvt_utf8_utf16<char16_t> 529 : public codecvt<char16_t, char, mbstate_t> 530{ 531 unsigned long _Maxcode_; 532 codecvt_mode _Mode_; 533public: 534 typedef char16_t intern_type; 535 typedef char extern_type; 536 typedef mbstate_t state_type; 537 538 _LIBCPP_INLINE_VISIBILITY 539 explicit __codecvt_utf8_utf16(size_t __refs, unsigned long _Maxcode, 540 codecvt_mode _Mode) 541 : codecvt<char16_t, char, mbstate_t>(__refs), _Maxcode_(_Maxcode), 542 _Mode_(_Mode) {} 543_LIBCPP_SUPPRESS_DEPRECATED_POP 544 545protected: 546 virtual result 547 do_out(state_type& __st, 548 const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt, 549 extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; 550 virtual result 551 do_in(state_type& __st, 552 const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt, 553 intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const; 554 virtual result 555 do_unshift(state_type& __st, 556 extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; 557 virtual int do_encoding() const _NOEXCEPT; 558 virtual bool do_always_noconv() const _NOEXCEPT; 559 virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, 560 size_t __mx) const; 561 virtual int do_max_length() const _NOEXCEPT; 562}; 563 564template <class _Elem, unsigned long _Maxcode = 0x10ffff, 565 codecvt_mode _Mode = (codecvt_mode)0> 566class _LIBCPP_TEMPLATE_VIS codecvt_utf8_utf16 567 : public __codecvt_utf8_utf16<_Elem> 568{ 569public: 570 _LIBCPP_INLINE_VISIBILITY 571 explicit codecvt_utf8_utf16(size_t __refs = 0) 572 : __codecvt_utf8_utf16<_Elem>(__refs, _Maxcode, _Mode) {} 573 574 _LIBCPP_INLINE_VISIBILITY 575 ~codecvt_utf8_utf16() {} 576}; 577 578_LIBCPP_END_NAMESPACE_STD 579 580#endif // _LIBCPP_CODECVT 581