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

@@ -30,21 +30,11 @@ bool operator==(const GeckoCode& lhs, const GeckoCode& rhs)
return lhs.codes == rhs.codes;
}
bool operator!=(const GeckoCode& lhs, const GeckoCode& rhs)
{
return !operator==(lhs, rhs);
}
bool operator==(const GeckoCode::Code& lhs, const GeckoCode::Code& rhs)
{
return std::tie(lhs.address, lhs.data) == std::tie(rhs.address, rhs.data);
}
bool operator!=(const GeckoCode::Code& lhs, const GeckoCode::Code& rhs)
{
return !operator==(lhs, rhs);
}
enum class Installation
{
Uninstalled,