Use of lpNorm in Eigen
c++, eigen
Solution
Classical C++ mistake. The solution is to use the `template` keyword as follow:
return matrix.template lpNorm<1>();
See the details.
Problem
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?