diff options
Diffstat (limited to 'src/corelib/tools/qhashfunctions.h')
-rw-r--r-- | src/corelib/tools/qhashfunctions.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/tools/qhashfunctions.h b/src/corelib/tools/qhashfunctions.h index d013c26d66..d2d8147566 100644 --- a/src/corelib/tools/qhashfunctions.h +++ b/src/corelib/tools/qhashfunctions.h @@ -106,7 +106,8 @@ Q_CORE_EXPORT Q_DECL_PURE_FUNCTION uint qt_hash(QStringView key, uint chained = Q_DECL_CONST_FUNCTION inline uint qHash(std::nullptr_t, uint seed = 0) Q_DECL_NOTHROW { - return qHash(reinterpret_cast<quintptr>(nullptr), seed); + const void *ptr = nullptr; // work-around for MSVC's reinterpret_cast bug + return qHash(reinterpret_cast<quintptr>(ptr), seed); } template <class T> inline uint qHash(const T *key, uint seed = 0) Q_DECL_NOTHROW |