C++20 Overloading the Spaceship Operator for Comparing DirectX Vector Values
The C++20 standard introduces a comparison operator “<=>” (Spaceship operator), which is used to compare two values and return the result of the comparison. Compared to sequential size checks, the “Spaceship operator” simplifies the process of comparing values, making the code more concise.The result returned by the Spaceship operator belongs to strong_ordering, partial_ordering, and weak_ordering. … Read more