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 set, multiset and priority_queue examples, to specify the sorting order for elements in a container.

Image

Fig. 16.14. Function objects in the Standard Library.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.111.134