C++20: Synthesize operator!= From operator==

The inequality operator is automatically generated by the compiler if `operator==` is defined.
This commit is contained in:
mitaclaw
2024-10-08 17:16:57 -07:00
parent b5f7a50874
commit e8d5fb89e4
36 changed files with 0 additions and 101 deletions

View File

@ -20,7 +20,6 @@ struct ConfigChangedCallbackID
size_t id = -1;
bool operator==(const ConfigChangedCallbackID&) const = default;
bool operator!=(const ConfigChangedCallbackID&) const = default;
};
using ConfigChangedCallback = std::function<void()>;

View File

@ -15,11 +15,6 @@ bool Location::operator==(const Location& other) const
strcasecmp(key.c_str(), other.key.c_str()) == 0;
}
bool Location::operator!=(const Location& other) const
{
return !(*this == other);
}
bool Location::operator<(const Location& other) const
{
if (system != other.system)

View File

@ -28,7 +28,6 @@ struct Location
std::string key;
bool operator==(const Location& other) const;
bool operator!=(const Location& other) const;
bool operator<(const Location& other) const;
};