C++20 three way comparison operator: Part 6

Gajendra Gulgulia
5 min readJul 10, 2021
image ©: gajendra gulgulia

In the fifth part of the tutorial series, I demonstrated the usage of std::strong_ordering comparison category as a return type for the three way operator. In the process, I clarified the meanings of terminologies like value of an object, salient properties and substitutablity. In the current part I’ll explain the usage of second comparison category, i.e., std::weak_ordering defined in the C++20’s new compare

--

--