diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h index 61a02f795ba..6aafb86c01e 100644 --- a/src/corelib/tools/qlist.h +++ b/src/corelib/tools/qlist.h @@ -137,10 +137,10 @@ public: // libstdc++ shipped with gcc < 11 does not have a fix for defect LWG 3346 #if __cplusplus >= 202002L && (!defined(_GLIBCXX_RELEASE) || _GLIBCXX_RELEASE >= 11) using iterator_category = std::contiguous_iterator_tag; + using element_type = value_type; #else using iterator_category = std::random_access_iterator_tag; #endif - using element_type = value_type; using pointer = T *; using reference = T &; @@ -179,10 +179,10 @@ public: // libstdc++ shipped with gcc < 11 does not have a fix for defect LWG 3346 #if __cplusplus >= 202002L && (!defined(_GLIBCXX_RELEASE) || _GLIBCXX_RELEASE >= 11) using iterator_category = std::contiguous_iterator_tag; + using element_type = const value_type; #else using iterator_category = std::random_access_iterator_tag; #endif - using element_type = const value_type; using pointer = const T *; using reference = const T &;