[eigen] Ambiguous call

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hello,

I have a problem with a simple call to the determinant of a Eigen::Matrix<NT,Eigen::Dynamic,Eigen::Dynamic> . This works for many different instantiations of NT, like mpq_class. The problem is when I try to use a rational number type from the CGAL library, CGAL::Gmpq. I get the following error from the compiler:

/usr/local/include/eigen3/Eigen/src/Core/Functors.h:284:90: error: call of overloaded ‘abs(const CGAL::Gmpq&)’ is ambiguous

The point is that the function abs(a) is also defined for CGAL::Gmpq. Digging inside the code, I found that the line 284 of the above file reads

EIGEN_STRONG_INLINE const result_type operator() (const Scalar& a) const { return abs(a); }

This function is inside the namespace internal::, and I think what is intended here is to return internal::abs(a). Changing this line resulted in a correct compilation.

My question are two, then. Is it right what I am saying? Is it feasible to make this change permanent?

Thank you,

--
Luis




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/