This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen

Bug 543

Summary: compile error with assignment operator overloads using XCode clang 421.11.66 compiler
Product: Eigen Reporter: Gerhard <gerhard.reitmayr>
Component: Core - generalAssignee: Nobody <eigen.nobody>
Status: NEW ---    
Severity: Unknown CC: gael.guennebaud, jacob.benoit.1
Priority: Normal    
Version: 3.1   
Hardware: x86 - 64-bit   
OS: Mac OS   
Whiteboard:
Attachments:
Description Flags
test example none

Description Gerhard 2013-01-20 13:08:58 UTC
Created attachment 311 [details]
test example

Hi,

Compiling the attached simple test case fails with an ambiguous overload:

error: use of overloaded operator '=' is ambiguous (with operand types 'Block<Eigen::Matrix<double, 4, 4, 0, 4, 4>, 3, 1>' and 'Vector3d' (aka 'Matrix<double, 3, 1>'))
    m.block<3,1>(0,0) = v;

eigen.cpp:14:5: note: in instantiation of function template specialization 'test<1>' requested here
    test<1>();
    ^
/opt/local/include/eigen3/Eigen/src/Core/MatrixBase.h:154:14: note: candidate function [with OtherDerived = Eigen::Matrix<double, 3, 1, 0, 3, 1>]
    Derived& operator=(const DenseBase<OtherDerived>& other);
             ^
/opt/local/include/eigen3/Eigen/src/Core/MatrixBase.h:157:14: note: candidate function [with OtherDerived = Eigen::Matrix<double, 3, 1, 0, 3, 1>]
    Derived& operator=(const EigenBase<OtherDerived>& other);
             ^

It works with the gcc front end, or if the function is not a template function.

cheers,
  Gerhard
Comment 1 Gael Guennebaud 2013-01-22 08:16:38 UTC
Works for me with:
* Apple clang version 2.1 (tags/Apple/clang-163.7.1) (based on LLVM 3.0svn)
* Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
* clang version 3.1
* clang version 3.2
* clang version 3.3
Comment 2 Nobody 2019-12-04 12:01:27 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/543.