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.6 6.5 Change-Id: I87f84cb9ff3ad339c000604423295180176f5799 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit f4cfc21dec6319c2ae99042be6bb12922a9d336d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
bd17f3f370
commit
bfd565a4d3
@ -1399,6 +1399,11 @@ QT_WARNING_DISABLE_MSVC(4530) /* C++ exception handler used, but unwind semantic
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// libstdc++ shipped with gcc < 11 does not have a fix for defect LWG 3346
|
||||
#if __cplusplus >= 202002L && (!defined(_GLIBCXX_RELEASE) || _GLIBCXX_RELEASE >= 11)
|
||||
# define QT_COMPILER_HAS_LWG3346
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus) && __cplusplus >= 202002L // P0846 doesn't have a feature macro :/
|
||||
# define QT_COMPILER_HAS_P0846
|
||||
#endif
|
||||
|
@ -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
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <qlist.h>
|
||||
|
||||
|
||||
#if __cplusplus >= 202002L && (!defined(_GLIBCXX_RELEASE) || _GLIBCXX_RELEASE >= 11)
|
||||
#ifdef QT_COMPILER_HAS_LWG3346
|
||||
# if __has_include(<concepts>)
|
||||
# include <concepts>
|
||||
# if defined(__cpp_lib_concepts) && __cpp_lib_concepts >= 202002L
|
||||
|
Loading…
x
Reference in New Issue
Block a user