1 //===----------------------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
13 // template <class Elem, unsigned long Maxcode = 0x10ffff,
14 // codecvt_mode Mode = (codecvt_mode)0>
15 // class codecvt_utf8_utf16
16 // : public codecvt<Elem, char, mbstate_t>
21 // int max_length() const throw();
26 #include "test_macros.h"
30 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
32 typedef std::codecvt_utf8_utf16
<wchar_t> C
;
34 int r
= c
.max_length();
38 typedef std::codecvt_utf8_utf16
<wchar_t, 0xFFFFFFFF, std::consume_header
> C
;
40 int r
= c
.max_length();
43 #endif // TEST_HAS_NO_WIDE_CHARACTERS
45 typedef std::codecvt_utf8_utf16
<char16_t
> C
;
47 int r
= c
.max_length();
51 typedef std::codecvt_utf8_utf16
<char16_t
, 0xFFFFFFFF, std::consume_header
> C
;
53 int r
= c
.max_length();
57 typedef std::codecvt_utf8_utf16
<char32_t
> C
;
59 int r
= c
.max_length();
63 typedef std::codecvt_utf8_utf16
<char32_t
, 0xFFFFFFFF, std::consume_header
> C
;
65 int r
= c
.max_length();