[libcxx-commits] [libcxxabi] [libcxx] [libc++] Remove dependence on <ciso646> (PR #73271)
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Nov 23 22:51:59 PST 2023
================
@@ -12,15 +12,15 @@
// Attempt to get STL specific macros like _LIBCPP_VERSION using the most
// minimal header possible. If we're testing libc++, we should use `<__config>`.
-// If <__config> isn't available, fall back to <ciso646>.
+// If <__config> isn't available, fall back to <version>.
#ifdef __has_include
# if __has_include("<__config>")
# include <__config>
# define TEST_IMP_INCLUDED_HEADER
# endif
#endif
#ifndef TEST_IMP_INCLUDED_HEADER
-#include <ciso646>
+# include <version>
----------------
mordante wrote:
The libc++ test suite is intended to work with other standard libraries and all Standard versions. This change might break some Standard library in C++03 mode. Can you use something like. (please make sure this example is formatted properly)
```
#ifndef TEST_IMP_INCLUDED_HEADER
# ifdef __has_include
# if __has_include("<version>")
# include <version>
# define TEST_IMP_INCLUDED_HEADER
# endif
# endif
#endif
#ifndef TEST_IMP_INCLUDED_HEADER
# include <ciso646>
#endif
```
This should keep the test suite portable.
https://github.com/llvm/llvm-project/pull/73271
More information about the libcxx-commits
mailing list