[libcxx-commits] [libcxx] [libc++] Fix header deprecations (PR #163356)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Nov 10 08:29:47 PST 2025
================
@@ -26,18 +26,10 @@
# pragma GCC system_header
# endif
-# if _LIBCPP_STD_VER >= 20
-
-using __standard_header_ccomplex
- _LIBCPP_DEPRECATED_("removed in C++20. Include <complex> instead.") _LIBCPP_NODEBUG = void;
-using __use_standard_header_ccomplex _LIBCPP_NODEBUG = __standard_header_ccomplex;
-
-# elif _LIBCPP_STD_VER >= 17
-
-using __standard_header_ccomplex _LIBCPP_DEPRECATED_("Include <complex> instead.") _LIBCPP_NODEBUG = void;
-using __use_standard_header_ccomplex _LIBCPP_NODEBUG = __standard_header_ccomplex;
-
+# if _LIBCPP_STD_VER >= 17 && !__building_module(std) && _LIBCPP_DIAGNOSE_DEPRECATED_HEADERS
----------------
ldionne wrote:
As you discussed just now, we could probably use a `#pragma clang deprecated_header("reason")`, that way this warning would be part of `-Wdeprecated` instead of `-W#warning`.
https://github.com/llvm/llvm-project/pull/163356
More information about the libcxx-commits
mailing list