| 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 |
// These constructors are still unavailable in C++03, but this test depends |
| 10 |
// on access control SFINAE and fails without it. |
| 11 |
// UNSUPPORTED: c++03 |
| 12 |
|
| 13 |
// <locale> |
| 14 |
|
| 15 |
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT -D_LIBCPP_ENABLE_CXX26_REMOVED_WSTRING_CONVERT |
| 16 |
|
| 17 |
// wstring_convert<Codecvt, Elem, Wide_alloc, Byte_alloc> |
| 18 |
|
| 19 |
// wstring_convert(wstring_convert const&) = delete; |
| 20 |
// wstring_convert& operator=(wstring_convert const&) = delete; |
| 21 |
|
| 22 |
// XFAIL: no-wide-characters |
| 23 |
|
| 24 |
#include <cassert> |
| 25 |
#include <codecvt> |
| 26 |
#include <locale> |
| 27 |
#include <type_traits> |
| 28 |
|
| 29 |
#include "test_macros.h" |
| 30 |
|
| 31 |
int main(int, char**) |
| 32 |
{ |
| 33 |
typedef std::codecvt_utf8<wchar_t> Codecvt; |
| 34 |
typedef std::wstring_convert<Codecvt> Myconv; |
| 35 |
static_assert(!std::is_copy_constructible<Myconv>::value, ""); |
| 36 |
static_assert(!std::is_copy_assignable<Myconv>::value, ""); |
| 37 |
|
| 38 |
return 0; |
| 39 |
} |