diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-02-05 14:39:25 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-02-09 18:08:39 +0000 |
commit | 492d6feda74596f2405a7b77b25cf98faf7196f5 (patch) | |
tree | 549b0ecdec8bb5eda9fd2b1ee54c7a254844bfa7 /tests | |
parent | e548f845d34610d5a4484881cf4379d0385b1a49 (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.
Change-Id: I11bcefe455a1f13865c15d4beecbd3fe32115328
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 23181340ca5cfc3f9c768ebd3b532f7e0305417e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests')
-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 |