What is the equivalent of std::less for the three-way comparison operator?

90 views Asked by At

Does C++20 define something similar to std::less for three-way comparison operator (<=>).

I would like define some datasructure with customizable comparator as map or unordered_map do.

template <class DefaultComparison = std::??????<Key>,
struct MyContainer ... 
1

There are 1 answers

0
bolov On BEST ANSWER

std::compare_three_way is what you are looking for.