C++20 spaceship operator for XMFLOAT2, XMFLOAT3, etc.
walbourn opened this issue · comments
Chuck Walbourn commented
Add defaulted comparisons for C++20 scenarios to XMFLOAT2
, XMINT2
, XMUINT2
, XMFLOAT3
, XMINT3
, XMUINT3
, XMFLOAT4
, XMINT4
, XMUINT4
, XMFLOAT3X3
, XMFLOAT4X3
, XMFLOAT3X4
, and XMFLOAT4X4
#if (__cplusplus >= 202002L)
bool operator == (const XMFLOAT2&) const = default;
auto operator <=> (const XMFLOAT2&) const = default;
#endif
This enables automatic generation of all the comparison operators.