From Jason Turner
Watch on YouTube

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.

Resources

Tags