Re: [eigen] Can we prevent that this compiles?

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi

On Wednesday 30 September 2009 20:28:29 Hauke Heibel wrote:
> Here, this patch is working. When Gael and/or Benoit agree, I could submit
> it. Though the error message on VC is not very nice...
> 
> Hauke
> 
> ---------- error message - begin ----------
> Error    1    error C2664:
> 'Eigen::Replicate<MatrixType,RowFactor,ColFactor>::Replicate(const
> Eigen::Replicate<MatrixType,RowFactor,ColFactor>::MustBeInstantiatedWith<Ma
> trixType> &)' : cannot convert parameter 1 from
> 'Eigen::Block<MatrixType,BlockRows,BlockCols>' to 'const
> Eigen::Replicate<MatrixType,RowFactor,ColFactor>::MustBeInstantiatedWith<Ma
> trixType> &'    main.cpp    9
> ---------- error message - end ----------

GCC's isn't better :-D
---------- error message - begin ----------
test.cc: In function ‘int main()’:
test.cc:8: error: no matching function for call to 
‘Eigen::Replicate<Eigen::Matrix<double, 33331, 33331, 0, 33331, 33331>, 2, 
1>::Replicate(Eigen::Block<Eigen::Matrix<double, 33331, 33331, 0, 33331, 
33331>, 1, 33331, 1, 32>)’
/tmp/eigen2/Eigen/src/Array/Replicate.h:87: note: candidates are: 
Eigen::Replicate<MatrixType, RowFactor, ColFactor>::Replicate(const 
MatrixType&, int, int) [with MatrixType = Eigen::Matrix<double, 33331, 33331, 
0, 33331, 33331>, int RowFactor = 2, int ColFactor = 1]
/tmp/eigen2/Eigen/src/Array/Replicate.h:81: note:                 
Eigen::Replicate<MatrixType, RowFactor, ColFactor>::Replicate(const 
Eigen::Replicate<MatrixType, RowFactor, 
ColFactor>::MustBeInstantiatedWith<MatrixType>&) [with MatrixType = 
Eigen::Matrix<double, 33331, 33331, 0, 33331, 33331>, int RowFactor = 2, int 
ColFactor = 1]
/tmp/eigen2/Eigen/src/Array/Replicate.h:67: note:                 
Eigen::Replicate<Eigen::Matrix<double, 33331, 33331, 0, 33331, 33331>, 2, 
1>::Replicate(const Eigen::Replicate<Eigen::Matrix<double, 33331, 33331, 0, 
33331, 33331>, 2, 1>&)
---------- error message - end ----------



But shouldn't the same be applied to the second constructor, Replicate(const 
MatrixType&, int, int)?

Markus
-- 
PGP key on www.esat.kuleuven.be/~mmoll/public_key.pgp
Fingerprint is 
90C4 B47D 1A00 5AC1 9147  3197 EDA7 1E0E 99E4 9EDB



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/