February 2022
Beginner
848 pages
22h 40m
English
Function objects, or functors, might sound exotic or intimidating, but they are entities of C++ that you have probably seen, if not also used, without even realizing it.
In this lesson, you learn
■ What function objects are
■ How to use function objects as predicates
■ How unary and binary predicates are implemented using function objects
On a conceptual level, function objects are objects that work as functions. On an implementation level, however, function objects are objects of a class that implement operator(). Although functions and function pointers can also be classified as function objects, it is the capability of an object of a class that implements
Read now
Unlock full access