bool(int) - type of function; bool(*)(int) - type of function pointer. In other words, if you define
typedef bool(BF)(int); typedef bool(pBF*)(int);
then BF* matches pBF .
The std::function template captures return and argument types through (variable) templates:
template <typename R, typename ...Args> struct function { function(R(&f)(Args...));
source share