Skip to content

Commit c7a9c59

Browse files
committed
[libc++] Removes codecvt.
Implements: - P2871R3 Remove Deprecated Unicode Conversion Facets from C++26
1 parent 92d9f23 commit c7a9c59

File tree

53 files changed

+89
-49
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+89
-49
lines changed

libcxx/docs/ReleaseNotes/18.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Implemented Papers
5151
- P2467R1 - Support exclusive mode for fstreams
5252
- P0020R6 - Floating Point Atomic
5353
- P2918R2 - Runtime format strings II
54+
- P2871R3 - Remove Deprecated Unicode Conversion Facets from C++26
5455

5556

5657
Improvements and New Features
@@ -71,6 +72,10 @@ Improvements and New Features
7172
on a per translation unit basis using the ``_LIBCPP_HARDENING_MODE`` macro. See :ref:`the hardening documentation
7273
<using-hardening-modes>` for more details.
7374

75+
- The ``_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT`` macro has been added to make
76+
the declarations in ``<codecvt>`` available.
77+
78+
7479
Deprecations and Removals
7580
-------------------------
7681

libcxx/docs/Status/Cxx2cPapers.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"`P2821R5 <https://wg21.link/P2821R5>`__","LWG","``span.at()``","Kona November 2023","","",""
3939
"`P2868R3 <https://wg21.link/P2868R3>`__","LWG","Remove Deprecated ``std::allocator`` Typedef From C++26","Kona November 2023","","",""
4040
"`P2870R3 <https://wg21.link/P2870R3>`__","LWG","Remove ``basic_string::reserve()`` From C++26","Kona November 2023","","",""
41-
"`P2871R3 <https://wg21.link/P2871R3>`__","LWG","Remove Deprecated Unicode Conversion Facets from C++26","Kona November 2023","","",""
41+
"`P2871R3 <https://wg21.link/P2871R3>`__","LWG","Remove Deprecated Unicode Conversion Facets from C++26","Kona November 2023","|Complete|","18.0",""
4242
"`P2819R2 <https://wg21.link/P2819R2>`__","LWG","Add tuple protocol to complex","Kona November 2023","","",""
4343
"`P2937R0 <https://wg21.link/P2937R0>`__","LWG","Freestanding: Remove ``strtok``","Kona November 2023","","",""
4444
"`P2833R2 <https://wg21.link/P2833R2>`__","LWG","Freestanding Library: inout expected span","Kona November 2023","","",""

libcxx/docs/UsingLibcxx.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,13 @@ C++20 Specific Configuration Macros
329329
`result_of` and `result_of_t`.
330330

331331

332+
C++26 Specific Configuration Macros
333+
-----------------------------------
334+
335+
**_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT**:
336+
This macro is used to re-enable all named declarations in ``<codecvt>``.
337+
338+
332339
Libc++ Extensions
333340
=================
334341

libcxx/include/codecvt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ class codecvt_utf8_utf16
6363
# pragma GCC system_header
6464
#endif
6565

66+
#if _LIBCPP_STD_VER < 26 || defined(_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT)
67+
6668
_LIBCPP_BEGIN_NAMESPACE_STD
6769

6870
enum _LIBCPP_DEPRECATED_IN_CXX17 codecvt_mode
@@ -553,6 +555,8 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
553555

554556
_LIBCPP_END_NAMESPACE_STD
555557

558+
#endif // _LIBCPP_STD_VER < 26 || defined(_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT)
559+
556560
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
557561
# include <atomic>
558562
# include <concepts>

libcxx/modules/std/codecvt.inc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@
99

1010
export namespace std {
1111
#ifndef _LIBCPP_HAS_NO_LOCALIZATION
12+
# if _LIBCPP_STD_VER < 26 || defined(_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT)
1213
using std::codecvt_mode;
1314

1415
using std::codecvt_utf16;
1516
using std::codecvt_utf8;
1617
using std::codecvt_utf8_utf16;
18+
# endif // _LIBCPP_STD_VER < 26 || defined(_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT)
1719
#endif // _LIBCPP_HAS_NO_LOCALIZATION
1820
} // namespace std

libcxx/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// UNSUPPORTED: c++03
1212

13-
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
13+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
1414

1515
// <locale>
1616

libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/buffered_reads.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
9+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
1010
// UNSUPPORTED: c++03
1111

1212
// <fstream>

libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/buffered_writes.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
9+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
1010
// UNSUPPORTED: c++03
1111

1212
// <fstream>

libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/utf_sanity_check.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// XFAIL: availability-char8_t_support-missing
1010

1111
// This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
12-
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
12+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
1313

1414
// <locale>
1515

libcxx/test/std/localization/locale.stdcvt/codecvt_mode.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
// <codecvt>
1010

11-
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
11+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
1212

1313
// enum codecvt_mode
1414
// {

libcxx/test/std/localization/locale.stdcvt/codecvt_utf16.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
// <codecvt>
1010

11-
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
11+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
1212

1313
// template <class Elem, unsigned long Maxcode = 0x10ffff,
1414
// codecvt_mode Mode = (codecvt_mode)0>

libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_always_noconv.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
// <codecvt>
1010

11-
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
11+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
1212

1313
// template <class Elem, unsigned long Maxcode = 0x10ffff,
1414
// codecvt_mode Mode = (codecvt_mode)0>

libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_encoding.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
// <codecvt>
1010

11-
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
11+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
1212

1313
// template <class Elem, unsigned long Maxcode = 0x10ffff,
1414
// codecvt_mode Mode = (codecvt_mode)0>

libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_in.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
// <codecvt>
1010

11-
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
11+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
1212

1313
// template <class Elem, unsigned long Maxcode = 0x10ffff,
1414
// codecvt_mode Mode = (codecvt_mode)0>

libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_length.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
// <codecvt>
1010

11-
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
11+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
1212

1313
// template <class Elem, unsigned long Maxcode = 0x10ffff,
1414
// codecvt_mode Mode = (codecvt_mode)0>

libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_max_length.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
// <codecvt>
1010

11-
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
11+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
1212

1313
// template <class Elem, unsigned long Maxcode = 0x10ffff,
1414
// codecvt_mode Mode = (codecvt_mode)0>

libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_out.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
// <codecvt>
1010

11-
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
11+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
1212

1313
// template <class Elem, unsigned long Maxcode = 0x10ffff,
1414
// codecvt_mode Mode = (codecvt_mode)0>

libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_unshift.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
// <codecvt>
1010

11-
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
11+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
1212

1313
// template <class Elem, unsigned long Maxcode = 0x10ffff,
1414
// codecvt_mode Mode = (codecvt_mode)0>

libcxx/test/std/localization/locale.stdcvt/codecvt_utf8.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
// <codecvt>
1010

11-
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
11+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
1212

1313
// template <class Elem, unsigned long Maxcode = 0x10ffff,
1414
// codecvt_mode Mode = (codecvt_mode)0>

libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_always_noconv.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
// <codecvt>
1010

11-
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
11+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
1212

1313
// template <class Elem, unsigned long Maxcode = 0x10ffff,
1414
// codecvt_mode Mode = (codecvt_mode)0>

libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_encoding.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
// <codecvt>
1010

11-
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
11+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
1212

1313
// template <class Elem, unsigned long Maxcode = 0x10ffff,
1414
// codecvt_mode Mode = (codecvt_mode)0>

libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_in.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
// <codecvt>
1010

11-
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
11+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
1212

1313
// template <class Elem, unsigned long Maxcode = 0x10ffff,
1414
// codecvt_mode Mode = (codecvt_mode)0>

libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_length.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
// <codecvt>
1010

11-
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
11+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
1212

1313
// template <class Elem, unsigned long Maxcode = 0x10ffff,
1414
// codecvt_mode Mode = (codecvt_mode)0>

libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_max_length.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
// <codecvt>
1010

11-
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
11+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
1212

1313
// template <class Elem, unsigned long Maxcode = 0x10ffff,
1414
// codecvt_mode Mode = (codecvt_mode)0>

libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_out.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
// <codecvt>
1010

11-
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
11+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
1212

1313
// template <class Elem, unsigned long Maxcode = 0x10ffff,
1414
// codecvt_mode Mode = (codecvt_mode)0>

libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_unshift.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
// <codecvt>
1010

11-
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
11+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
1212

1313
// template <class Elem, unsigned long Maxcode = 0x10ffff,
1414
// codecvt_mode Mode = (codecvt_mode)0>

libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_always_noconv.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
// <codecvt>
1010

11-
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
11+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
1212

1313
// template <class Elem, unsigned long Maxcode = 0x10ffff,
1414
// codecvt_mode Mode = (codecvt_mode)0>

libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_encoding.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
// <codecvt>
1010

11-
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
11+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
1212

1313
// template <class Elem, unsigned long Maxcode = 0x10ffff,
1414
// codecvt_mode Mode = (codecvt_mode)0>

libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_in.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
// <codecvt>
1010

11-
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
11+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
1212

1313
// template <class Elem, unsigned long Maxcode = 0x10ffff,
1414
// codecvt_mode Mode = (codecvt_mode)0>

libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_length.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
// <codecvt>
1010

11-
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
11+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
1212

1313
// template <class Elem, unsigned long Maxcode = 0x10ffff,
1414
// codecvt_mode Mode = (codecvt_mode)0>

libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_max_length.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
// <codecvt>
1010

11-
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
11+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
1212

1313
// template <class Elem, unsigned long Maxcode = 0x10ffff,
1414
// codecvt_mode Mode = (codecvt_mode)0>

libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_out.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
// <codecvt>
1010

11-
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
11+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
1212

1313
// template <class Elem, unsigned long Maxcode = 0x10ffff,
1414
// codecvt_mode Mode = (codecvt_mode)0>

libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_unshift.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
// <codecvt>
1010

11-
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
11+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
1212

1313
// template <class Elem, unsigned long Maxcode = 0x10ffff,
1414
// codecvt_mode Mode = (codecvt_mode)0>

libcxx/test/std/localization/locale.stdcvt/depr.verify.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
// UNSUPPORTED: c++03, c++11, c++14
9+
// UNSUPPORTED: c++03, c++11, c++14, c++26
1010
// UNSUPPORTED: no-wide-characters
1111

1212
// <codecvt>
1313

14-
// ensure that codecvt content is marked as deprecated
14+
// Ensure that codecvt content is marked as deprecated.
15+
// The header has been removed in C++26.
1516

1617
#include <codecvt>
1718

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20, c++23
10+
// UNSUPPORTED: no-wide-characters
11+
12+
// <codecvt>
13+
14+
// Ensure that codecvt content is marked as removed.
15+
16+
#include <codecvt>
17+
18+
std::codecvt_mode c1; // expected-error {{no type named 'codecvt_mode' in namespace 'std'}}
19+
std::codecvt_utf8<wchar_t> c2; // expected-error {{no template named 'codecvt_utf8' in namespace 'std'}}
20+
std::codecvt_utf16<wchar_t> c3; // expected-error {{no template named 'codecvt_utf16' in namespace 'std'}}
21+
std::codecvt_utf8_utf16<wchar_t> c4; // expected-error {{no template named 'codecvt_utf8_utf16' in namespace 'std'}}

libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/ctor.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
// <locale>
1010

11-
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
11+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
1212

1313
// wbuffer_convert<Codecvt, Elem, Tr>
1414

libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/depr.verify.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
// UNSUPPORTED: c++03, c++11, c++14
9+
// UNSUPPORTED: c++03, c++11, c++14, c++26
1010

1111
// XFAIL: no-wide-characters
1212

libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/overflow.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
// <locale>
1010

11-
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
11+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
1212

1313
// wbuffer_convert<Codecvt, Elem, Tr>
1414

libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/pbackfail.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
// <locale>
1010

11-
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
11+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
1212

1313
// wbuffer_convert<Codecvt, Elem, Tr>
1414

0 commit comments

Comments
 (0)