wrongly calling _init1<T>()
Submitted by cDc
Assigned to Nobody
Link to original bugzilla bug (#1393)
Version: 3.3 (current stable)
Description
Created attachment 776
code to reproduce the error
Not able to use a custom structure, that exposes an operator to access it as an Eigen matrix, as a Eigen type. Please see the simple example attached.
The compilation failes with VC2015 with the following message:
1>d:\pro\lib\eigen\eigen\src\core\matrix.h(296): error C2664: 'void Eigen::PlainObjectBase<Eigen::Matrix<double,3,1,0,3,1>>::_init1<T>(const double *)': cannot convert argument 1 from 'const TPoint3<TYPE>' to 'Eigen::EigenBase<Derived>::Index'
1> with
1> [
1> T=TPoint3<TYPE>
1> ]
1> and
1> [
1> Derived=Eigen::Matrix<double,3,1,0,3,1>
1> ]
1> d:\pro\lib\eigen\eigen\src\core\matrix.h(296): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
1> d:\pro\src\consoleapplication1\consoleapplication1.cpp(22): note: see reference to function template instantiation 'Eigen::Matrix<double,3,1,0,3,1>::Matrix<TPoint3<TYPE>>(const T &)' being compiled
1> with
1> [
1> T=TPoint3<TYPE>
1> ]
1> d:\pro\src\consoleapplication1\consoleapplication1.cpp(22): note: see reference to function template instantiation 'Eigen::Matrix<double,3,1,0,3,1>::Matrix<TPoint3<TYPE>>(const T &)' being compiled
1> with
1> [
1> T=TPoint3<TYPE>
1> ]
Attachment 776, "code to reproduce the error":
ConsoleApplication1.cpp
Blocking
Edited by Eigen Bugzilla