I have just defined 4 different typedefs with minimal differences and I'm wondering if there's way to use templates to do this more efficiently.
My typedef is of the form: typedef Type1 (*pf)(Type2, Type3, ...)
How do I template this typedef?
Only Type1
is required.
I manually write:
typedef int (*pf)(int)
typedef bool (*pf)()
typedef char (*pf)(bool, int)
I'm looking for something like:
template <Type T1,Type...Rest>
typedef T1 (*pf)(Type...Rest)
Is that correct?