Callable Objects
suggest changeIntroduction
A callable is anything std::invoke can call. Examples include functions, function pointers, pointers to members, lambdas, and objects whose classes overload operator(). A pointer to a member is not invoked with ordinary function-call syntax; use .*, ->*, or std::invoke (since C++17). Most of these can be stored in std::function when their signatures are compatible. Standard-library algorithms commonly accept callables as predicates, projections, or operations.
Remarks
A very useful talk by Stephan T. Lavavej (<functional>: What’s New, And Proper Use) (Slides) leads to the base of this documentation.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents