Predefined Function Objects of the Standard Template Library
Many predefined function objects can be found in the header <functional>. Figure 16.14 lists several of the dozens of Standard Library function objects, which are all implemented as class templates. Section 20.8 of the C++ standard contains the complete list of function objects. We used the function object
less<T> in the
priority_queue examples, to specify the sorting order for elements in a container.