microsoft / DirectXMath

DirectXMath is an all inline SIMD C++ linear algebra library for use in games and graphics apps
https://walbourn.github.io/introducing-directxmath/
MIT License
1.51k stars 231 forks source link

Add C++20 defaulted comparisions to structs to support all comparisons #147

Closed walbourn closed 2 years ago

walbourn commented 2 years ago

C++20 supports defaulted comparisons, and the recommendation is to define just the two primary operators. The complier can derive all other comparison operators from those.

walbourn commented 2 years ago

Added coverage for building DirectXMath with C++20 enabled in this commit for the test suite.

walbourn commented 2 years ago

Once this changes are in use, SimpleMath types which derive from these will automatically have the new comparison operators.