1 //===----------------------------------------------------------------------===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8 
9 // <locale>
10 
11 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT -D_LIBCPP_ENABLE_CXX26_REMOVED_WSTRING_CONVERT
12 
13 // wstring_convert<Codecvt, Elem, Wide_alloc, Byte_alloc>
14 
15 // wstring_convert(Codecvt* pcvt, state_type state);
16 
17 // XFAIL: no-wide-characters
18 
19 #include <locale>
20 #include <codecvt>
21 #include <cassert>
22 
23 #include "test_macros.h"
24 
main(int,char **)25 int main(int, char**)
26 {
27     {
28         typedef std::codecvt_utf8<wchar_t> Codecvt;
29         typedef std::wstring_convert<Codecvt> Myconv;
30         Myconv myconv(new Codecvt, std::mbstate_t());
31         assert(myconv.converted() == 0);
32     }
33 
34   return 0;
35 }
36