Re: [eigen] clang-3.1 issue |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: Benjamin Schindler <bschindler@xxxxxxxxxxx>
- Subject: Re: [eigen] clang-3.1 issue
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Wed, 13 Jun 2012 21:42:12 +0200
- Cc: eigen@xxxxxxxxxxxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=quGInnPDd8wxZ7LXp2DCWYV1AFWjuDIevSyt/1aXI+8=; b=iYvqPUTFHLAoYkSuVi6H5uI6AWCinp0cI1B7TAqhVtcfH2u2NQyHYRExz3FfZKcmM9 YqDFHxwcOJ/tlqxVPMvMVO0pwjagrV3/q5E9nb8CqEYPemRq0Q2NPkWuv6EyvgdZ//Yz Q409hHHFN+4njZYB6ZnTiDzFgfQLbda3RSjXqzAeKZMFLyqVNoDF2JK8x048bi3Ni2aC 3dCQmv+VjksuPvF1GOqO55IEGDReux9IgEUFTwvkokWIXhpsJfeI1L9IVqzZuf38EwGo dYVVCWmG7ZvRSSeqUW3Xp9YtC4//NnsK5oN7vVM6+Z+476Adw5XUUBCnfeURA9hla1Oj tphQ==
thanks!
gael
On Wed, Jun 13, 2012 at 9:34 PM, Benjamin Schindler
<bschindler@xxxxxxxxxxx> wrote:
> After experimenting a little bit more, I was convinced and filed a bug:
>
> http://llvm.org/bugs/show_bug.cgi?id=13103
>
> Cheers
> Benjamin
>
>
> On 13.06.2012 20:27, Gael Guennebaud wrote:
>>
>> Indeed, that looks like a clang bug. I've no idea how to workaround it.
>>
>> gael
>>
>> On Wed, Jun 13, 2012 at 1:21 PM, Benjamin Schindler
>> <bschindler@xxxxxxxxxxx> wrote:
>>>
>>> Hi
>>>
>>> I just stumbled over this issue, may be you have some input on it, but
>>> I'm really thinking I have found a clang bug. Consider the attached code
>>> (I used latest tip of Eigen). It fails to compile with
>>>
>>> test.cpp:11:18: error: use of overloaded operator '=' is ambiguous (with
>>> operand types 'typename FixedSegmentReturnType<3>::Type' (aka
>>> 'VectorBlock<Eigen::Matrix<float, 4, 1, 0, 4, 1>, 3>') and 'const
>>> ConstantReturnType' (aka 'const
>>> CwiseNullaryOp<internal::scalar_constant_op<Scalar>,
>>> Eigen::Matrix<float, 3, 1, 0, 3, 1> >'))
>>> input.head<3>() = Vector3f::Zero();
>>> ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~
>>> test.cpp:17:2: note: in instantiation of function template
>>> specialization 'myFunction<float>' requested here
>>> myFunction<float>();
>>> ^
>>> /local/bschindler/projects/eigen/Eigen/src/Core/MatrixBase.h:169:14:
>>> note: candidate function [with OtherDerived =
>>> Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>,
>>> Eigen::Matrix<float, 3, 1, 0, 3, 1> >]
>>> Derived& operator=(const DenseBase<OtherDerived>& other);
>>> ^
>>> /local/bschindler/projects/eigen/Eigen/src/Core/MatrixBase.h:172:14:
>>> note: candidate function [with OtherDerived =
>>> Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>,
>>> Eigen::Matrix<float, 3, 1, 0, 3, 1> >]
>>> Derived& operator=(const EigenBase<OtherDerived>& other);
>>>
>>>
>>> Now, If I move lines 10 and 11 into the main function it compiles.
>>> clang bug?
>>>
>>> Cheers
>>> Benjamin
>>
>>
>