Z
zr
Hi,
My original intent was to use the following code:
template <typename T> // compilation error: at typedef template is
illegal
typedef (*FunctionType)(T*,T const*,T const*,T const*,T const*, int
const*);
template <typename T, FunctionType f>
class foo
{
....
}
but the compiler complained about no templated typedef allowed.
Instead i am using the following not so aesthetic code:
template <typename T, (*f)(T*,T const*,T const*,T const*,T const*, int
const*)>
class foo
{
....
}
Now each class that inherits from foo will have this horrific template
declaration.
Is there any better way to do this?
My original intent was to use the following code:
template <typename T> // compilation error: at typedef template is
illegal
typedef (*FunctionType)(T*,T const*,T const*,T const*,T const*, int
const*);
template <typename T, FunctionType f>
class foo
{
....
}
but the compiler complained about no templated typedef allowed.
Instead i am using the following not so aesthetic code:
template <typename T, (*f)(T*,T const*,T const*,T const*,T const*, int
const*)>
class foo
{
....
}
Now each class that inherits from foo will have this horrific template
declaration.
Is there any better way to do this?