Since C ++ 11, you can use the using keyword for an effect very similar to typedef, and it allows you to create templates:
template<typename SD> using FuncPtr = void (*)(void*, SD*);
Before that, you had to separate the template from typedef:
template<typename SD> struct FuncPtr { typedef void (*type)(void*, SD*); };
(and type name FuncPtr<U>::type instead of just FuncPtr<U> )
source share