Since hmjd answer has been deleted ...
In C ++ 11, a whole syntax of aliases was developed to make such things a lot easier:
using task = unsigned (__stdcall*)(void*);
equivalent to typedef unsigned (__stdcall* task)(void*); (note the position of the alias in the middle of the function signature ...).
It can also be used for templates:
template <typename T> using Vec = std::vector<T>; int main() { Vec<int> x; }
This syntax is rather pleasant than the old one (and for templates, it actually makes it possible to overlay templates), but it requires a completely new compiler.
source share