forked from qt-creator/qt-creator
Fix build issues with C++20
- "ISO C++20 considers use of overloaded operator!= to be ambiguous despite there being a unique best viable function with non-reversed arguments" - std::erase(std::vector, ...) takes preference over Utils::erase if not fully qualified Fixes: QTCREATORBUG-25598 Change-Id: Ib9d0574ff46d2ab415437c0c044c51e8c9f37caa Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -82,8 +82,8 @@ class PeripheralRegisterValue final
|
||||
{
|
||||
public:
|
||||
PeripheralRegisterValue(quint64 v = 0) : v(v) {}
|
||||
bool operator==(const PeripheralRegisterValue &other) { return v == other.v; }
|
||||
bool operator!=(const PeripheralRegisterValue &other) { return !operator==(other); }
|
||||
bool operator==(const PeripheralRegisterValue &other) const { return v == other.v; }
|
||||
bool operator!=(const PeripheralRegisterValue &other) const { return !operator==(other); }
|
||||
|
||||
bool fromString(const QString &string, PeripheralRegisterFormat fmt);
|
||||
QString toString(int size, PeripheralRegisterFormat fmt) const;
|
||||
|
||||
@@ -238,10 +238,11 @@ void KitManager::restoreKits()
|
||||
kitsToCheck.clear();
|
||||
|
||||
// Remove replacement kits for which the original kit has turned up again.
|
||||
erase(resultList, [&resultList](const std::unique_ptr<Kit> &k) {
|
||||
return k->isReplacementKit() && contains(resultList, [&k](const std::unique_ptr<Kit> &other) {
|
||||
return other->id() == k->id() && other != k;
|
||||
});
|
||||
Utils::erase(resultList, [&resultList](const std::unique_ptr<Kit> &k) {
|
||||
return k->isReplacementKit()
|
||||
&& contains(resultList, [&k](const std::unique_ptr<Kit> &other) {
|
||||
return other->id() == k->id() && other != k;
|
||||
});
|
||||
});
|
||||
|
||||
static const auto kitMatchesAbiList = [](const Kit *kit, const Abis &abis) {
|
||||
|
||||
Reference in New Issue
Block a user