bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

stdbool C++ tests: Fix for C++20


From: Bruno Haible
Subject: stdbool C++ tests: Fix for C++20
Date: Sat, 10 Sep 2022 19:32:27 +0200

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  <bruno@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

[Prev in Thread] Current Thread [Next in Thread]