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 14:33:13 -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=z7G+rXTtXwprFxnHgBhmlNkHP/1mfNTUPXxkM5AFBlc=; b=UOgE7yJTB9EKCZFunIKLhF3JKmCtFA2bPphnNQvq8vM2eKyMXn7qbUWvxggNUTm/DG kzBV0JnBf/0qojMGd9TZTokr3nb+FBMKeWu/GXpQNZusk0DLWd7XLtLZ5+6TV4D/2yrT yzUexIzF30HUtBjnqZ4o08qyvyzR7uYVWBsYs=
2011/12/7 Luis Peñaranda <luis.penaranda@xxxxxxx>:
>> Sounds good, will you make a patch?
>
> Sure, it's done. Let me know if something goes wrong.
Sorry, where's the patch?
Benoit
>
> Best,
>
> --
> Luis
>
>
>> 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
>>>
>>>
>>>
>>
>>
>
>
>