[Development] Help needed: MSVC 2017 compiler bug with QHash in 5.15 - QTBUG-82166
Thiago Macieira
thiago.macieira at intel.com
Sun Feb 16 19:30:41 CET 2020
https://bugreports.qt.io/browse/QTBUG-82166
The bug report says:
qmap.h(1213): error C2244: "QMultiMap<K,V>::insert": Keine Übereinstimmung für
Funktionsdefinition mit vorhandener Deklaration gefunden [...
\msvc.build_x64\audiofile\audiofile.vcxproj]
qmap.h(1211): note: Siehe Deklaration von "QMultiMap<K,V>::insert"
qmap.h(1213): note: Definition
qmap.h(1213): note: 'QMultiMap<K,V>::iterator QMultiMap<K,V>::insert(const Key
&,const T &)'
qmap.h(1213): note: Vorhandene Deklarationen
qmap.h(1213): note: 'QMap<K,V>::iterator
QMultiMap<K,V>::insert(QMap<K,V>::const_iterator,const Key &,const T &)'
qmap.h(1213): note: 'QMap<K,V>::iterator QMultiMap<K,V>::insert(const Key
&,const T &)'
my sloppy translation of German is that the compiler is at the definition of
QMultiMap<K,V>::iterator QMultiMap<K,V>::insert(const Key &,const T &)
and can't find the previous declaration of such a function. It suggests these
two instead:
QMap<K,V>::iterator QMultiMap<K,V>::insert(QMap<K,V>::const_iterator,const Key
&,const T &)
QMap<K,V>::iterator QMultiMap<K,V>::insert(const Key &,const T &)
The second one should have matched, since QMultiMap's iterator is just QMap's:
using typename QMap<Key, T>::iterator;
In fact, this is a using declaration, not a typedef.
MSVC 2019 compiled the change without a problem and the CI seems to have found
no problem. The bug reporter indicates this is happening on a precompiled
header, so it may be difficult to reproduce.
Is there a volunteer to help figuring this out? I'm strapped for time and
access to the 2017 compiler is limited for me.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel System Software Products
More information about the Development
mailing list