diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-02-05 14:39:25 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-02-09 16:22:32 +0000 |
commit | 23181340ca5cfc3f9c768ebd3b532f7e0305417e (patch) | |
tree | e82a288cb1f577380f3333d1667fbc99dd53ec07 /tests/auto/corelib/tools/containerapisymmetry/tst_containerapisymmetry.cpp | |
parent | c6d221f0a97bcc7391e2e396ee1cb7df1fc3c509 (diff) |
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 <marc.mutz@qt.io>
Diffstat (limited to 'tests/auto/corelib/tools/containerapisymmetry/tst_containerapisymmetry.cpp')
-rw-r--r-- | tests/auto/corelib/tools/containerapisymmetry/tst_containerapisymmetry.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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 <unordered_set> #include <unordered_map> -#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 |