#include int func(int x, int y) { return x+y; } int main() { typedef std::function Funcp; Funcp funcp = func;
Is this what you want?
#include template T func(T x, T y) { return x+y; } template struct FunctionType { typedef std::function Type ; } ; int main() { FunctionType::Type Funcp = func ; }