diff options
author | Marc Mutz <marc.mutz@qt.io> | 2024-02-08 11:36:57 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2024-02-08 17:43:59 +0100 |
commit | f4cfc21dec6319c2ae99042be6bb12922a9d336d (patch) | |
tree | 7b931914361f7c413348274470368adac28eee8b /src/corelib/tools/qlist.h | |
parent | 8b4536ccf53dac8b447c70ace7ba0684a9030d8a (diff) |
QList: give the LWG 3346 #ifdef'ery a symbolic name
We'll need this in more places, so centralize its definition in
qcompilerdetection.h.
Amends 595b4e1a9b436a8190964dc41f79621400f5a6be.
Pick-to: 6.7 6.6 6.5
Change-Id: I87f84cb9ff3ad339c000604423295180176f5799
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/corelib/tools/qlist.h')
-rw-r--r-- | src/corelib/tools/qlist.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h index fc526c43cf..a0f29aadf6 100644 --- a/src/corelib/tools/qlist.h +++ b/src/corelib/tools/qlist.h @@ -116,8 +116,7 @@ public: public: using difference_type = qsizetype; using value_type = T; - // libstdc++ shipped with gcc < 11 does not have a fix for defect LWG 3346 -#if __cplusplus >= 202002L && (!defined(_GLIBCXX_RELEASE) || _GLIBCXX_RELEASE >= 11) +#ifdef QT_COMPILER_HAS_LWG3346 using iterator_concept = std::contiguous_iterator_tag; using element_type = value_type; #endif @@ -187,8 +186,7 @@ public: public: using difference_type = qsizetype; using value_type = T; - // libstdc++ shipped with gcc < 11 does not have a fix for defect LWG 3346 -#if __cplusplus >= 202002L && (!defined(_GLIBCXX_RELEASE) || _GLIBCXX_RELEASE >= 11) +#ifdef QT_COMPILER_HAS_LWG3346 using iterator_concept = std::contiguous_iterator_tag; using element_type = const value_type; #endif |