forked from qt-creator/qt-creator
Fix lvalue references and rvalue reference incorrectly matching
Adds the comparison of isRvalueReference to make sure they get difference entries. Change-Id: I294205786f3d1322e542d3b308d61ab44647ecc9 Fixes: QTCREATORBUG-13839 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
6
src/libs/3rdparty/cplusplus/Control.cpp
vendored
6
src/libs/3rdparty/cplusplus/Control.cpp
vendored
@@ -74,7 +74,11 @@ template <> struct Compare<ReferenceType>
|
||||
{
|
||||
bool operator()(const ReferenceType &ty, const ReferenceType &otherTy) const
|
||||
{
|
||||
return ty.elementType() < otherTy.elementType();
|
||||
if (ty.elementType() < otherTy.elementType())
|
||||
return true;
|
||||
if (ty.elementType() == otherTy.elementType())
|
||||
return (int)ty.isRvalueReference() < (int)otherTy.isRvalueReference();
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user