Why are there two implementations of std::sort (with and without a comparator) rather than one implementation with a default template parameter?
- by PolyVox
In my code I'm adopting a design strategy which is similar to some standard library algorithms in that the exact behavior can be customized by a function object. The simplest example is std::sort, where a function object can control how the comparison is made between objects.
I notice that the Visual C++ provides two implementations of std::sort,…