I am trying to do some L_p norm calculations within a template function something of the sort
template<typename Number>
Number foo(const Eigen::MatrixBase<Number>& matrix)
{
return matrix.lpNorm<1>();
}
However, CLang throws an error "expected expression" at the end of the line if I try to call foo(matrix)
. If I work with concretely defined (double) matrices, lpNorm
works just fine. How do I go about with this case?