There are so many ways of writing the comparator though. One with bool operator<, one with bool operator (), with structs, with just a function. What is the difference between all of them?
`<' is quite a small name, so when you do a < b it should be extremely obvious how the comparison is being done
if that's not the case, better use a function.
there may be times when you do have operator<, but you need another behaviour, for example to compare by x or y or distance to the origin, then you may use a function
sometimes that comparison is too specific and you wouldn't need it in another place, so may use a lambda
in other cases, you need to maintain a state, for example, one algorithm to find the convex hull of a set of points sorts them by angle to one anchor point
there you may need an class with overload operator()