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