Visual studio 2015. c++ compiler error C2280 attempting to reference a deleted function

偶尔善良 提交于 2019-12-06 19:13:31

I ran into this myself, turned out to be a bug in Eigen. In my case, just replacing the following line in src/Eigen/Eigen/src/Core/util/Macros.h

#if defined(_MSC_VER) && (!defined(__INTEL_COMPILER))

with

#if defined(_MSC_VER) && (_MSC_VER < 1900) && (!defined(__INTEL_COMPILER))

solved this issue. The assignment operators are then generated.

It seems that you try to reinitialize the reference by doing

OtherDerived& other = _other.const_cast_derived();

and then

other = otherCopy;
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!