Skip to content

Commit 41a8305

Browse files
authored
[libc++] Removes deprecated _LIBCPP_ENABLE_<VERSION>_REMOVED_FEATURES macros (#88548)
We marked those macros as deprecated in the last release with the intent of removing them in LLVM 19. This commit performs the removal.
1 parent 9cd3e92 commit 41a8305

File tree

6 files changed

+1
-115
lines changed

6 files changed

+1
-115
lines changed

libcxx/docs/ReleaseNotes/19.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Deprecations and Removals
9797
- The ``_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS`` and ``_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_VOID_SPECIALIZATION``
9898
macros have been removed in LLVM 19.
9999

100-
- TODO: The ``_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES`` and ``_LIBCPP_ENABLE_CXX20_REMOVED_FEATURES`` macros have
100+
- The ``_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES`` and ``_LIBCPP_ENABLE_CXX20_REMOVED_FEATURES`` macros have
101101
been removed in LLVM 19. C++17 and C++20 removed features can still be re-enabled individually.
102102

103103
- The ``_LIBCPP_INLINE_VISIBILITY`` and ``_VSTD`` macros have been removed in LLVM 19.

libcxx/docs/UsingLibcxx.rst

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,6 @@ safety annotations.
208208

209209
C++17 Specific Configuration Macros
210210
-----------------------------------
211-
**_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES**:
212-
This macro is used to re-enable all the features removed in C++17. The effect
213-
is equivalent to manually defining each macro listed below.
214-
This macro is deprecated and will be removed in LLVM-19. Use the
215-
individual macros listed below.
216-
217211
**_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR**:
218212
This macro is used to re-enable `auto_ptr`.
219213

@@ -238,12 +232,6 @@ C++20 Specific Configuration Macros
238232
This macro is used to re-enable the function
239233
``std::shared_ptr<...>::unique()``.
240234

241-
**_LIBCPP_ENABLE_CXX20_REMOVED_FEATURES**:
242-
This macro is used to re-enable all the features removed in C++20. The effect
243-
is equivalent to manually defining each macro listed below.
244-
This macro is deprecated and will be removed in LLVM-19. Use the
245-
individual macros listed below.
246-
247235
**_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS**:
248236
This macro is used to re-enable the `argument_type`, `result_type`,
249237
`first_argument_type`, and `second_argument_type` members of class

libcxx/include/__config

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,6 @@
1616
# pragma GCC system_header
1717
#endif
1818

19-
#if defined(_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES) && !defined(_LIBCPP_DISABLE_DEPRECATION_WARNINGS)
20-
# pragma clang deprecated( \
21-
_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES, \
22-
"_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES is deprecated in LLVM 18 and will be removed in LLVM 19")
23-
#endif
24-
#if defined(_LIBCPP_ENABLE_CXX20_REMOVED_FEATURES) && !defined(_LIBCPP_DISABLE_DEPRECATION_WARNINGS)
25-
# pragma clang deprecated( \
26-
_LIBCPP_ENABLE_CXX20_REMOVED_FEATURES, \
27-
"_LIBCPP_ENABLE_CXX20_REMOVED_FEATURES is deprecated in LLVM 18 and will be removed in LLVM 19")
28-
#endif
29-
3019
#if defined(__apple_build_version__)
3120
// Given AppleClang XX.Y.Z, _LIBCPP_APPLE_CLANG_VER is XXYZ (e.g. AppleClang 14.0.3 => 1403)
3221
# define _LIBCPP_COMPILER_CLANG_BASED
@@ -1230,21 +1219,6 @@ typedef __char32_t char32_t;
12301219
# define _LIBCPP_IF_WIDE_CHARACTERS(...) __VA_ARGS__
12311220
# endif
12321221

1233-
# if defined(_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES)
1234-
# define _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR
1235-
# define _LIBCPP_ENABLE_CXX17_REMOVED_BINDERS
1236-
# define _LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE
1237-
# define _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS
1238-
# define _LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION
1239-
# endif // _LIBCPP_ENABLE_CXX17_REMOVED_FEATURES
1240-
1241-
# if defined(_LIBCPP_ENABLE_CXX20_REMOVED_FEATURES)
1242-
# define _LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS
1243-
# define _LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS
1244-
# define _LIBCPP_ENABLE_CXX20_REMOVED_RAW_STORAGE_ITERATOR
1245-
# define _LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS
1246-
# endif // _LIBCPP_ENABLE_CXX20_REMOVED_FEATURES
1247-
12481222
// clang-format off
12491223
# define _LIBCPP_PUSH_MACROS _Pragma("push_macro(\"min\")") _Pragma("push_macro(\"max\")") _Pragma("push_macro(\"refresh\")") _Pragma("push_macro(\"move\")") _Pragma("push_macro(\"erase\")")
12501224
# define _LIBCPP_POP_MACROS _Pragma("pop_macro(\"min\")") _Pragma("pop_macro(\"max\")") _Pragma("pop_macro(\"refresh\")") _Pragma("pop_macro(\"move\")") _Pragma("pop_macro(\"erase\")")

libcxx/test/libcxx/depr/enable_removed_cpp17_features.compile.pass.cpp

Lines changed: 0 additions & 36 deletions
This file was deleted.

libcxx/test/libcxx/depr/enable_removed_cpp17_features.deprecated.verify.cpp

Lines changed: 0 additions & 20 deletions
This file was deleted.

libcxx/test/libcxx/depr/enable_removed_cpp20_features.deprecated.verify.cpp

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)