diff options
| author | Olivier Goffart <ogoffart@woboq.com> | 2018-03-23 11:34:10 +0100 |
|---|---|---|
| committer | Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> | 2018-03-28 08:16:57 +0000 |
| commit | c59cb9809559f0aae6be8544cb2049e41f8040e9 (patch) | |
| tree | d1bcb90d1c69f4714858ecc25e4a3058342148d8 /src/corelib/thread/qfuturewatcher.cpp | |
| parent | e83f1900f657a41036bd16e917527fcb7a52fd2b (diff) | |
Fix MSVC2017 compilation with enabled relaxed constexpr on 32-bit target
The problem is that qCountLeadingZeroBits is calling qPopulationCount
which is only conditionally constexpr, so qCountLeadingZeroBits can only
be marked constexpr if qPopulationCount is also.
On MSVC2017 64bit this is not a problem because it uses builtins function
in this case. (which is not constexpr, but it works because the compiler
is not forced to diagnose the problem because of the "?:" operator.
The error being fixed is:
qalgorithms.h(847): error C3615: constexpr function 'qCountLeadingZeroBits' cannot result in a constant expression
qalgorithms.h(858): note: failure was caused by call of undefined function or one not declared 'constexpr'
qalgorithms.h(858): note: see usage of 'qPopulationCount'
Task-number: QTBUG-67259
Change-Id: I65a3dfae12ca49394bec14ffefdd41a07fee1c32
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/thread/qfuturewatcher.cpp')
0 files changed, 0 insertions, 0 deletions
