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

@ -47,7 +47,6 @@ union RasterizationState
}
bool operator==(const RasterizationState& rhs) const { return hex == rhs.hex; }
bool operator!=(const RasterizationState& rhs) const { return !operator==(rhs); }
bool operator<(const RasterizationState& rhs) const { return hex < rhs.hex; }
BitField<0, 2, CullMode> cullmode;
@ -73,7 +72,6 @@ union FramebufferState
}
bool operator==(const FramebufferState& rhs) const { return hex == rhs.hex; }
bool operator!=(const FramebufferState& rhs) const { return !operator==(rhs); }
BitField<0, 8, AbstractTextureFormat> color_texture_format;
BitField<8, 8, AbstractTextureFormat> depth_texture_format;
@ -108,7 +106,6 @@ union DepthState
}
bool operator==(const DepthState& rhs) const { return hex == rhs.hex; }
bool operator!=(const DepthState& rhs) const { return !operator==(rhs); }
bool operator<(const DepthState& rhs) const { return hex < rhs.hex; }
BitField<0, 1, u32> testenable;
@ -143,7 +140,6 @@ union BlendingState
}
bool operator==(const BlendingState& rhs) const { return hex == rhs.hex; }
bool operator!=(const BlendingState& rhs) const { return !operator==(rhs); }
bool operator<(const BlendingState& rhs) const { return hex < rhs.hex; }
BitField<0, 1, u32> blendenable;
@ -185,7 +181,6 @@ struct SamplerState
}
bool operator==(const SamplerState& rhs) const { return Hex() == rhs.Hex(); }
bool operator!=(const SamplerState& rhs) const { return !operator==(rhs); }
bool operator<(const SamplerState& rhs) const { return Hex() < rhs.Hex(); }
constexpr u64 Hex() const { return tm0.hex | (static_cast<u64>(tm1.hex) << 32); }