Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.0.0
-
None
-
Windows, Visual Studio 2019
-
-
647c0e80ed2e190778016c4208b5d6f1f9fd6543 (qt/qtbase/dev)
Description
In qlagorithms.h, the function qPopulationCount, the reference to std::popcount fails to compile when using C++20.
: error C2039: 'popcount': is not a member of 'std' 1>C:\Qt\6.0.0\msvc2019_64\include\QtCore\qhashfunctions.h(303): message : see declaration of 'std'
In Windows, the following header is required to define std::popcount
#include <bit>
https://docs.microsoft.com/en-us/cpp/standard-library/bit-functions?view=msvc-160#popcount
Attachments
For Gerrit Dashboard: QTBUG-91117 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
334375,1 | Fix compilation errors with MSVC /std:c++20, but no /Zc:__cplusplus | dev | qt/qtbase | Status: ABANDONED | +1 | 0 |
334623,3 | Enforce __cplusplus >= 201703L on MSVC | dev | qt/qtbase | Status: MERGED | +2 | 0 |
334649,1 | WIP: Check for _MSVC_LANG in public headers | dev | qt/qtbase | Status: ABANDONED | -2 | 0 |
335088,5 | headersclean: Compile with -std=c++latest, -Zc:__cplusplus on MSVC | dev | qt/qtbase | Status: MERGED | -1 | 0 |
335195,2 | Disallow C++ > 17 on MSVC unless /Zc:__cplusplus is passed | dev | qt/qtbase | Status: ABANDONED | +1 | 0 |
337440,2 | headersclean: Compile with -std=c++latest, -Zc:__cplusplus on MSVC | 6.1 | qt/qtbase | Status: MERGED | +2 | 0 |