Re: [eigen] Ambiguous call |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Ambiguous call
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Wed, 7 Dec 2011 07:57:28 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=KHRLFODa5/LqRowqWM5hDl/a/3nmq2gZGQTx+KW1QsI=; b=fR7GFRINHyYj40BgIBmM6oTzEHuJly7oFAFIOWUq7wJ0PPBTSu0Jvlp32PczYP1w1x 7dKKuhKCpYmlle8Z+NfYfqGIztEKhJLG6N7rpkia4CfGFgsaT0qHZ0XK4tJ3zE0VWQ/Z J26yU4fH4sU45OLo1pW18MN6f16qYXBF0ug+I=
Sounds good, will you make a patch?
Benoit
2011/12/7 Luis Peñaranda <luis.penaranda@xxxxxxx>:
> 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
>
>
>