Jump to content

C++ Language/Std/Stl/Algorithms/Modifying/Reordering

From Wikibooks, open books for an open world

The std::sort() algorithm uses a predicate callable-object for all of its internal comparisons between two items. That predicate defaults to std::less<>().

Additional information about reordering algorithms (includes interactive examples)