[libcxx] [llvm] [libc++] Deprecate and remove meaningless `<cxxx>` headers (PR #111615)
    Louis Dionne via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Oct 24 09:29:50 PDT 2024
    
    
  
================
@@ -23,4 +23,17 @@
 #  pragma GCC system_header
 #endif
 
+#if _LIBCPP_STD_VER >= 17
+
+using __standard_header_ccomplex
+#  if _LIBCPP_STD_VER >= 20
+    _LIBCPP_DEPRECATED_("removed in C++20. Include <complex> instead.")
+#  else
+    _LIBCPP_DEPRECATED_("Include <complex> instead.")
+#  endif
+    = void;
+using __use_standard_header_ccomplex = __standard_header_ccomplex;
+
+#endif
----------------
ldionne wrote:
```suggestion
#  if _LIBCPP_STD_VER >= 20
using __standard_header_ccomplex _LIBCPP_DEPRECATED_("removed in C++20. Include <complex> instead.") = void;
  using __use_standard_header_ccomplex = __standard_header_ccomplex;
#  elif _LIBCPP_STD_VER >= 17
  using __standard_header_ccomplex _LIBCPP_DEPRECATED_("Include <complex> instead.") = void;
  using __use_standard_header_ccomplex = __standard_header_ccomplex;
#endif
```
Maybe 1-2 lines longer but easier to follow IMO.
The same comment applies to other headers.
https://github.com/llvm/llvm-project/pull/111615
    
    
More information about the llvm-commits
mailing list