The type is a function type. You may not be so familiar with it, because until now it has only been used in pointer types:
typedef int (ft)(void); // Huh? (raw function type)
typedef ft *fp; // ??? (pointer to function)
typedef int (*fp_oldstyle)(void); // Ahh... (same as fp)
Functions themselves do have types, but since you cannot declare variables of that type or references to it, the only thing you would typically use are pointers, which are declared in the familiar syntax on the last line. For any function int foo(void);
, both foo
and &foo
are interpreted as the pointer, so the "raw" function type ft
isn't needed.
However, with the new template magic surrounding std::function
, std::bind
and lambdas, it is now a much more common thing to see naked function types in template parameters.