From 23181340ca5cfc3f9c768ebd3b532f7e0305417e Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Sat, 5 Feb 2022 14:39:25 +0100 Subject: tst_QContainerApiSymmetry: fix incorrect P1115 detection The value of __cplusplus has nothing to do with whether the library implements wg21.link/P1115 (libstdc++ even before C++20) or not (libc++, even in C++20). Use the idiomatic check (#if defined(foo) && foo >= x) instead, fixing the Android build. Pick-to: 6.3 6.2 Change-Id: I11bcefe455a1f13865c15d4beecbd3fe32115328 Reviewed-by: Marc Mutz --- .../corelib/tools/containerapisymmetry/tst_containerapisymmetry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto/corelib/tools/containerapisymmetry/tst_containerapisymmetry.cpp') diff --git a/tests/auto/corelib/tools/containerapisymmetry/tst_containerapisymmetry.cpp b/tests/auto/corelib/tools/containerapisymmetry/tst_containerapisymmetry.cpp index 95d2076b6e..5e2d7eab04 100644 --- a/tests/auto/corelib/tools/containerapisymmetry/tst_containerapisymmetry.cpp +++ b/tests/auto/corelib/tools/containerapisymmetry/tst_containerapisymmetry.cpp @@ -47,7 +47,7 @@ #include #include -#if __cplusplus >= 202002L && defined(__cpp_lib_erase_if) +#if defined(__cpp_lib_erase_if) && __cpp_lib_erase_if >= 202002L # define STDLIB_HAS_UNIFORM_ERASURE #endif -- cgit v1.2.3