Adaptors for Functions
The two functions std::bind
and std::functions
fit very well together. While std::bind
enables you to create new function objects on the fly, std::function
takes these temporary function objects and binds them to a variable. Both functions are powerful tools from functional programming and need the header <functional>
.