I am trying to make a type alias for a function (myFunction) inside myClass.
template<typename T>
using calc_t = matrix<T> (MyClass<T>::*myFunction)(const matrix<T> &X);
Where I would get a generic syntax error, missing ')' before MyClass<T>::*myFunction
.
And then using it as so
calc_t<double> fptr = &MyClass<double>::myFunction;
I am not sure on the syntax to use in this specific case for when using the using
type alias as opposed to a non-templated typedef.
I have looked at the following other SO questions that don't seem to cover this specific usage:
I have tried some other variants but to no success.