This post will introduce a C++ 11 feature, std::function
. It can wrap any kind of callable element into a copyable object and whose type depands soly on its call signature.
std::function
is an object who can replace the function poiner in C language but more safety. It is useful for implement of many C++ design patterns.
|
|