Since std::cosh
for std::complex<T>
is a function template, &std::cosh
doesn't make sense to the compiler because std::cosh
is not a function, it is a template of family of functions. You need to write another overload to handle this case:
#include <complex> //it is where std::cosh<T> is defined
template<class T>
std::vector<std::complex<T>> cosh(std::vector<std::complex<T>> const & v1)
{
typedef std::complex<T> cosh_type( std::complex<T> const &);
return eop(v1, static_cast<cosh_type*>(&std::cosh<T>) );
}
By the way, pass the argument by reference to avoid unnecessary copies.
Hope that helps.