[lld][WebAssembly] Reinstate mistakenly disabled test. NFC
[llvm-project.git] / libcxx / include / codecvt
blob74839d199686adad2a9261f9e6b9998e598bbd45
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 //===----------------------------------------------------------------------===//
10 #ifndef _LIBCPP_CODECVT
11 #define _LIBCPP_CODECVT
14     codecvt synopsis
16 namespace std
19 enum codecvt_mode
21     consume_header = 4,
22     generate_header = 2,
23     little_endian = 1
26 template <class Elem, unsigned long Maxcode = 0x10ffff,
27           codecvt_mode Mode = (codecvt_mode)0>
28 class codecvt_utf8
29     : public codecvt<Elem, char, mbstate_t>
31     explicit codecvt_utf8(size_t refs = 0);
32     ~codecvt_utf8();
35 template <class Elem, unsigned long Maxcode = 0x10ffff,
36           codecvt_mode Mode = (codecvt_mode)0>
37 class codecvt_utf16
38     : public codecvt<Elem, char, mbstate_t>
40     explicit codecvt_utf16(size_t refs = 0);
41     ~codecvt_utf16();
44 template <class Elem, unsigned long Maxcode = 0x10ffff,
45           codecvt_mode Mode = (codecvt_mode)0>
46 class codecvt_utf8_utf16
47     : public codecvt<Elem, char, mbstate_t>
49     explicit codecvt_utf8_utf16(size_t refs = 0);
50     ~codecvt_utf8_utf16();
53 }  // std
57 #include <__config>
58 #include <__locale>
59 #include <version>
61 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
62 #pragma GCC system_header
63 #endif
65 _LIBCPP_BEGIN_NAMESPACE_STD
67 enum codecvt_mode
69     consume_header = 4,
70     generate_header = 2,
71     little_endian = 1
74 // codecvt_utf8
76 template <class _Elem> class __codecvt_utf8;
78 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
79 template <>
80 class _LIBCPP_TYPE_VIS __codecvt_utf8<wchar_t>
81     : public codecvt<wchar_t, char, mbstate_t>
83     unsigned long _Maxcode_;
84     codecvt_mode _Mode_;
85 public:
86     typedef wchar_t   intern_type;
87     typedef char      extern_type;
88     typedef mbstate_t state_type;
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) {}
95 protected:
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;
113 #endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
115 _LIBCPP_SUPPRESS_DEPRECATED_PUSH
116 template <>
117 class _LIBCPP_TYPE_VIS __codecvt_utf8<char16_t>
118     : public codecvt<char16_t, char, mbstate_t>
120     unsigned long _Maxcode_;
121     codecvt_mode _Mode_;
122 public:
123     typedef char16_t  intern_type;
124     typedef char      extern_type;
125     typedef mbstate_t state_type;
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
134 protected:
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;
153 _LIBCPP_SUPPRESS_DEPRECATED_PUSH
154 template <>
155 class _LIBCPP_TYPE_VIS __codecvt_utf8<char32_t>
156     : public codecvt<char32_t, char, mbstate_t>
158     unsigned long _Maxcode_;
159     codecvt_mode _Mode_;
160 public:
161     typedef char32_t  intern_type;
162     typedef char      extern_type;
163     typedef mbstate_t state_type;
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
172 protected:
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;
191 template <class _Elem, unsigned long _Maxcode = 0x10ffff,
192           codecvt_mode _Mode = (codecvt_mode)0>
193 class _LIBCPP_TEMPLATE_VIS codecvt_utf8
194     : public __codecvt_utf8<_Elem>
196 public:
197     _LIBCPP_INLINE_VISIBILITY
198     explicit codecvt_utf8(size_t __refs = 0)
199         : __codecvt_utf8<_Elem>(__refs, _Maxcode, _Mode) {}
201     _LIBCPP_INLINE_VISIBILITY
202     ~codecvt_utf8() {}
205 // codecvt_utf16
207 template <class _Elem, bool _LittleEndian> class __codecvt_utf16;
209 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
210 template <>
211 class _LIBCPP_TYPE_VIS __codecvt_utf16<wchar_t, false>
212     : public codecvt<wchar_t, char, mbstate_t>
214     unsigned long _Maxcode_;
215     codecvt_mode _Mode_;
216 public:
217     typedef wchar_t   intern_type;
218     typedef char      extern_type;
219     typedef mbstate_t state_type;
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) {}
226 protected:
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;
245 template <>
246 class _LIBCPP_TYPE_VIS __codecvt_utf16<wchar_t, true>
247     : public codecvt<wchar_t, char, mbstate_t>
249     unsigned long _Maxcode_;
250     codecvt_mode _Mode_;
251 public:
252     typedef wchar_t   intern_type;
253     typedef char      extern_type;
254     typedef mbstate_t state_type;
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) {}
261 protected:
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;
279 #endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
281 _LIBCPP_SUPPRESS_DEPRECATED_PUSH
282 template <>
283 class _LIBCPP_TYPE_VIS __codecvt_utf16<char16_t, false>
284     : public codecvt<char16_t, char, mbstate_t>
286     unsigned long _Maxcode_;
287     codecvt_mode _Mode_;
288 public:
289     typedef char16_t  intern_type;
290     typedef char      extern_type;
291     typedef mbstate_t state_type;
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
300 protected:
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;
319 _LIBCPP_SUPPRESS_DEPRECATED_PUSH
320 template <>
321 class _LIBCPP_TYPE_VIS __codecvt_utf16<char16_t, true>
322     : public codecvt<char16_t, char, mbstate_t>
324     unsigned long _Maxcode_;
325     codecvt_mode _Mode_;
326 public:
327     typedef char16_t  intern_type;
328     typedef char      extern_type;
329     typedef mbstate_t state_type;
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
338 protected:
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;
357 _LIBCPP_SUPPRESS_DEPRECATED_PUSH
358 template <>
359 class _LIBCPP_TYPE_VIS __codecvt_utf16<char32_t, false>
360     : public codecvt<char32_t, char, mbstate_t>
362     unsigned long _Maxcode_;
363     codecvt_mode _Mode_;
364 public:
365     typedef char32_t  intern_type;
366     typedef char      extern_type;
367     typedef mbstate_t state_type;
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
376 protected:
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;
395 _LIBCPP_SUPPRESS_DEPRECATED_PUSH
396 template <>
397 class _LIBCPP_TYPE_VIS __codecvt_utf16<char32_t, true>
398     : public codecvt<char32_t, char, mbstate_t>
400     unsigned long _Maxcode_;
401     codecvt_mode _Mode_;
402 public:
403     typedef char32_t  intern_type;
404     typedef char      extern_type;
405     typedef mbstate_t state_type;
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
414 protected:
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;
433 template <class _Elem, unsigned long _Maxcode = 0x10ffff,
434           codecvt_mode _Mode = (codecvt_mode)0>
435 class _LIBCPP_TEMPLATE_VIS codecvt_utf16
436     : public __codecvt_utf16<_Elem, _Mode & little_endian>
438 public:
439     _LIBCPP_INLINE_VISIBILITY
440     explicit codecvt_utf16(size_t __refs = 0)
441         : __codecvt_utf16<_Elem, _Mode & little_endian>(__refs, _Maxcode, _Mode) {}
443     _LIBCPP_INLINE_VISIBILITY
444     ~codecvt_utf16() {}
447 // codecvt_utf8_utf16
449 template <class _Elem> class __codecvt_utf8_utf16;
451 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
452 template <>
453 class _LIBCPP_TYPE_VIS __codecvt_utf8_utf16<wchar_t>
454     : public codecvt<wchar_t, char, mbstate_t>
456     unsigned long _Maxcode_;
457     codecvt_mode _Mode_;
458 public:
459     typedef wchar_t   intern_type;
460     typedef char      extern_type;
461     typedef mbstate_t state_type;
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) {}
468 protected:
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;
486 #endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
488 _LIBCPP_SUPPRESS_DEPRECATED_PUSH
489 template <>
490 class _LIBCPP_TYPE_VIS __codecvt_utf8_utf16<char32_t>
491     : public codecvt<char32_t, char, mbstate_t>
493     unsigned long _Maxcode_;
494     codecvt_mode _Mode_;
495 public:
496     typedef char32_t  intern_type;
497     typedef char      extern_type;
498     typedef mbstate_t state_type;
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
507 protected:
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;
526 _LIBCPP_SUPPRESS_DEPRECATED_PUSH
527 template <>
528 class _LIBCPP_TYPE_VIS __codecvt_utf8_utf16<char16_t>
529     : public codecvt<char16_t, char, mbstate_t>
531     unsigned long _Maxcode_;
532     codecvt_mode _Mode_;
533 public:
534     typedef char16_t  intern_type;
535     typedef char      extern_type;
536     typedef mbstate_t state_type;
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
545 protected:
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;
564 template <class _Elem, unsigned long _Maxcode = 0x10ffff,
565           codecvt_mode _Mode = (codecvt_mode)0>
566 class _LIBCPP_TEMPLATE_VIS codecvt_utf8_utf16
567     : public __codecvt_utf8_utf16<_Elem>
569 public:
570     _LIBCPP_INLINE_VISIBILITY
571     explicit codecvt_utf8_utf16(size_t __refs = 0)
572         : __codecvt_utf8_utf16<_Elem>(__refs, _Maxcode, _Mode) {}
574     _LIBCPP_INLINE_VISIBILITY
575     ~codecvt_utf8_utf16() {}
578 _LIBCPP_END_NAMESPACE_STD
580 #endif // _LIBCPP_CODECVT