0

I'm trying to run a sample code of research article. When I compile the given code, it stuck with this following error:

Error   C2280   'Eigen::Block<Derived,3,1,true> &Eigen::Block<Derived,3,1,true>::operator =(const Eigen::Block<Derived,3,1,true> &)': attempting to reference a deleted function    sparseicp}

I get this error at the following snippet in a funtion:

 Eigen::Matrix3Xd Qp = Eigen::Matrix3Xd::Zero(3, X.cols());
    Eigen::Matrix3Xd Qn = Eigen::Matrix3Xd::Zero(3, X.cols());

for(int i=0; i<X.cols(); ++i) {
            int id = kdtree.closest(X.col(i).data());
            Qp.col(i) = Y.col(id); // getting error at this line
            Qn.col(i) = N.col(id);
        }

where X, Y, and N are passing parameters to the function

Eigen::MatrixBase<Derived1>& X,
Eigen::MatrixBase<Derived2>& Y,
Eigen::MatrixBase<Derived3>& N,

I tried with the following solution, but no luck.

http://eigen.tuxfamily.org/bz/show_bug.cgi?id=920

https://stackoverflow.com/q/43472463/4951777

C++ Compiler Error C2280 "attempting to reference a deleted function" in Visual Studio 2013 and 2015

Thanks in Advance.

3D-Point
  • 5
  • 6
  • Assignment operator with specific parameters is a deleted function which means it doesn't exist for that specific class – Asesh Oct 27 '17 at 03:28
  • Which version of Eigen are you using? Make sure to use a recent one, like 3.3.4. – ggael Oct 29 '17 at 20:24

0 Answers0