diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-02-05 14:40:53 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-02-11 22:56:35 +0100 |
commit | c0af004d7472065ccf64e2b05349febac1b4f9de (patch) | |
tree | b7690f3b30f5bdc7b33170db896fe6d949658706 /tests/auto/corelib/tools | |
parent | a0d1f6b5aae72d2bcd89a08b5ce102c9e88d819e (diff) |
Fix build with C++20 on macOS
The macOS standard library doesn't have std::contiguous_iterator yet, and
it doesn't seem like libc++ has it either.
Checking __cpp_lib_concepts for the C++20 official version appears to work.
Pick-to: 6.3 6.2
Change-Id: I8c31cd64de24c03b3a3f37cb393bb2f9b55a834d
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'tests/auto/corelib/tools')
-rw-r--r-- | tests/auto/corelib/tools/qlist/tst_qlist.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/corelib/tools/qlist/tst_qlist.cpp b/tests/auto/corelib/tools/qlist/tst_qlist.cpp index f40370bfb8..2b465cca07 100644 --- a/tests/auto/corelib/tools/qlist/tst_qlist.cpp +++ b/tests/auto/corelib/tools/qlist/tst_qlist.cpp @@ -37,7 +37,7 @@ #if __cplusplus >= 202002L && (!defined(_GLIBCXX_RELEASE) || _GLIBCXX_RELEASE >= 11) # if __has_include(<concepts>) # include <concepts> -# if defined(__cpp_concepts) +# if defined(__cpp_lib_concepts) && __cpp_lib_concepts >= 202002L static_assert(std::contiguous_iterator<QList<int>::iterator>); static_assert(std::contiguous_iterator<QList<int>::const_iterator>); # endif |