With C++20 concepts and three-way-comparison, I have made my own Map like this:
template<
typename TKey,
typename TValue,
std::strict_weak_order<TKey, TKey> KeyComparer = std::compare_three_way, // Error: template constraint not satisfied
typename PairAllocator = std::allocator<KeyValuePair<TKey, TValue>>
>class SortedMap
When SortedMap initializes, it failed with error template constraint not satisfied.
Modify std::strict_weak_order to typename then it's ok. (Error comes here certainly.)
Why doesn't std::compare_three_way satisfy std::strict_weak_order?