| 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 |
// wbuffer_convert<Codecvt, Elem, Tr> |
| 14 |
|
| 15 |
// state_type state() const; |
| 16 |
|
| 17 |
// XFAIL: no-wide-characters |
| 18 |
|
| 19 |
#include <locale> |
| 20 |
#include <codecvt> |
| 21 |
#include <sstream> |
| 22 |
#include <cassert> |
| 23 |
|
| 24 |
#include "test_macros.h" |
| 25 |
|
| 26 |
int main(int, char**) |
| 27 |
{ |
| 28 |
typedef std::wbuffer_convert<std::codecvt_utf8<wchar_t> > B; |
| 29 |
{ |
| 30 |
B b; |
| 31 |
std::mbstate_t s = b.state(); |
| 32 |
((void)s); |
| 33 |
} |
| 34 |
|
| 35 |
return 0; |
| 36 |
} |