Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.8
-
None
-
-
798c23189 (dev), aefa42745 (6.8), eb1342a3c (dev), db36fea29 (6.9), 1a580ca2a (dev)
-
Foundation Sprint 110
Description
The new QMap::qHash introduced in Qt 6.8 causes compilation errors because it is ambiguous:
QMap<int,int> map;
size_t seed = 0;
qHash(map, seed);
Compiler error:
Call to 'qHash' is ambiguous qhashfunctions.h:235:8: candidate function [with T = QMap<int, int>, $1 = true] qmap.h:796:5: candidate function [with M = QMap<int, int>, $1 = true]
Attachments
For Gerrit Dashboard: QTBUG-126659 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
571280,2 | tst_QHashFunctions: check qHash(QMap) isn't ambiguous | dev | qt/qtbase | Status: ABANDONED | +2 | 0 |
571285,5 | qHash(): make 1-to-2-arg adapter a worse match than regular 2-arg overloads | dev | qt/qtbase | Status: MERGED | +2 | 0 |
571792,2 | qHash(): make 1-to-2-arg adapter a worse match than regular 2-arg overloads | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |
631509,3 | qHash: break up the long line and add constexpr to the 1-arg catch-all | dev | qt/qtbase | Status: MERGED | +2 | 0 |
631510,6 | qHashMulti*: use the seed argument in the template and noexcept traits | dev | qt/qtbase | Status: MERGED | +2 | 0 |
631511,2 | qHashMultiCommutative: explicitly pass a zero seed | dev | qt/qtbase | Status: ABANDONED | 0 | 0 |
631645,2 | qHash: break up the long line and add constexpr to the 1-arg catch-all | 6.9 | qt/qtbase | Status: MERGED | +2 | 0 |
632053,1 | qHash: break up the long line and add constexpr to the 1-arg catch-all | 6.9.0 | qt/qtbase | Status: ABANDONED | +2 | 0 |