Summary
This episode explains what callable objects are in C++, defining them as anything that can be treated like a function (called with parentheses). Jason demonstrates various types of callables, including lambdas, free functions, and member function pointers. Most surprisingly, he shows that member object pointers can also be considered callables when used with std::invoke. The episode provides clear syntax examples for each type of callable, including the less commonly known member pointer calling syntax, and demonstrates how std::invoke unifies the interface for calling all these different callable types.
Related C++ Standard Sections
This episode covers topics found in these sections of the C++ standard:
-
[func.invoke]40% match