And back, I discovered that you can write a C ++ function that takes a function type parameter ( not a function pointer type!). For example, here is a function that takes a callback function that accepts and returns double:
void MyFunction(double function(double));
My question is what it means to have a function type variable, since you cannot declare it in any other context. Semantically, how is it different from a function pointer or function references? Is there an important difference between function pointers and function type variables that I should be aware of?
c ++ function types arguments
templatetypedef
source share