[go: up one dir, main page]

Reference to deleted assignment operator when compiling for MSVC 2017 and CUDA 10

Summary

When trying to compile Eigen with MSVC 2017 and CUDA 10, I am getting the error message:

error : function "Eigen::Block<XprType, BlockRows, BlockCols, InnerPanel>::operator=(const Eigen::Block<Eigen::Matrix<float, 3, 3, 0, 3, 3>, -1, 3, false> &) [ with XprType=Eigen::Matrix<float, 3, 3, 0, 3, 3>, BlockRows=-1, BlockCols=3, InnerPanel=false]"(declared implicitly) cannot be referenced -- it is a deleted function error : function "Eigen::Block<XprType, BlockRows, BlockCols, InnerPanel>::operator=(const Eigen::Block<Eigen::Matrix<float, 3, 3, 0, 3, 3>, 1, 3, false> &) [with XprType=Eigen::Matrix<float, 3, 3, 0, 3, 3>, BlockRows=1, BlockCols=3, InnerPanel=false]" (declared implicitly) cannot be referenced -- it is a deleted function

This error seems to be similar to issues #920 (closed) and #1000 (closed).

Environment

  • Operating System : Windows
  • Architecture : x64
  • Eigen Version : 3.3.9

Minimal Example

Here's the code that produces the error for me. It's just the QR least squares example taken from the Eigen documentation:

        Eigen::Matrix3f m = Eigen::Matrix3f::Random();
        Eigen::Matrix3f y = Eigen::Matrix3f::Random();
        Eigen::Matrix3f x;
        x = m.colPivHouseholderQr().solve(y);