From Jason Turner
Watch on YouTube

Summary

This episode explores std::bind, a utility introduced in C++11 (originally from Boost) that creates function objects by binding arguments to callable targets. Jason demonstrates how std::bind can create partial function applications, reorder arguments, and create adaptors for existing functions. He highlights important details about std::bind, including how it copies arguments by default, its inability to work directly with template functions, its compile-time overhead, and how its results can be stored in std::function objects for type erasure.

Resources

Tags