According to <https://en.cppreference.com/w/cpp/header/cstdbool>,
  #include <cstdbool>
is no longer allowed in C++20.

This patch updates our unit test accordingly.


2022-09-10  Bruno Haible  <br...@clisp.org>

        stdbool C++ tests: Fix for C++20.
        * tests/test-stdbool-c++2.cc: Don't include <cstdbool> in C++20 or
        newer.

diff --git a/tests/test-stdbool-c++2.cc b/tests/test-stdbool-c++2.cc
index 4d05e8073d..551cbb67a0 100644
--- a/tests/test-stdbool-c++2.cc
+++ b/tests/test-stdbool-c++2.cc
@@ -17,7 +17,7 @@
 #define GNULIB_NAMESPACE gnulib
 #include <config.h>
 
-#if __cplusplus >= 201103
+#if __cplusplus >= 201103 && __cplusplus < 202002
 
 # include <cstdbool>
 




Reply via email to