<ciso646> is gone from C++20, so use <version> for >= C++20.
See
https://stackoverflow.com/a/31658120.
Signed-off-by: Sam James <
sam@gentoo.org>
---
eclass/toolchain-funcs.eclass | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index ae21a18a14c23..baf032bbd4ecc 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -1156,7 +1156,12 @@ tc-enables-ssp-all() {
#
# If the library is not recognized, the function returns 1.
tc-get-cxx-stdlib() {
- local code='#include <ciso646>
+ local code='
+#if __cplusplus >= 202002L
+ #include <version>
+#else
+ #include <ciso646>
+#endif
#if defined(_LIBCPP_VERSION)
HAVE_LIBCXX
--
2.49.0
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)