I hope this is not a noob question – allthough it is my first here on stackoverflow 😉
When using partial_sort_copy with for example 2 vectors, it gives you the “smallest” n values, depending on how operator< is defined for the Class of the T (where n is the size of the target vector)
Is there a possibility to use operator> instead, without defining an extra function?
Thanks in advance 🙂
You don’t have to define an extra function; the C++ Standard Library already has one.
It’s called
std::greater.