|Summary:||Compilation issue with MSVC 2013 CTP, attempting to reference a deleted function for Block|
|Component:||Core - general||Assignee:||Nobody <eigen.nobody>|
|Severity:||Compilation Problem||CC:||chtz, gael.guennebaud, jacob.benoit.1|
|Hardware:||x86 - general|
|Bug Depends on:|
Description Christos 2015-04-20 12:32:21 UTC
Comment 1 Christoph Hertzberg 2015-04-20 18:56:00 UTC
I assume you are using 3.2? Can you check if the problem also occurs with the development branch? Also, can you check if these lines already fail to compile (with either compiler and Eigen version): Eigen::Vector3d a1; const Eigen::Vector3d a2; a1.head<1>()= a2.tail<1>(); If you can't reproduce this on any other compiler, this is very likely a compiler bug. If there is a simple work-around, we can integrate it (if not, we'd unfortunately have to make this a WONTFIX).
Comment 2 Christos 2015-04-21 00:29:27 UTC
Correct, currently using 3.2.4. The sample code that you provided compiles fine in both compiler versions. However, the issue persists in development version. After a bit of searching I was able to find in their blog a link that lists the breaking changes. The blog http://blogs.msdn.com/b/vcblog/archive/2013/11/18/announcing-the-visual-c-compiler-november-2013-ctp.aspx The link to the document, its a .docx http://aka.ms/I0w822 There is a section there titled "Implicitly declared special member functions". They made some changes that will mark functions as deleted as required by the C++ standard. I wonder if this is such a case ?
Comment 3 Gael Guennebaud 2015-04-21 20:22:24 UTC
Indeed, this is probably related to "Implicitly declared special member functions". In src/Core/util/Macros.h, line 316 we have three different variants of the macro EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR. Currently, in your case it should uses the last version. Could you explicitly try the other ones, especially the one for clang.
Comment 4 Christos 2015-04-21 23:35:05 UTC
The 2nd one generated a different error, while the 3rd compiles fine. I tested this quickly with the dev version. so not sure if there are any other issues. Will do some more testing later on and report back.
Comment 5 Christoph Hertzberg 2015-04-22 09:56:52 UTC
So fixing this only requires choosing the correct E_I_A_E_O implementation for MSVC? I wonder, if older MSVC versions have problems with the better (i.e., standard conforming) version? If not, we could simply remove the simple (but wrong) code path: using Base::operator=;
Comment 6 Christos 2015-04-22 11:26:09 UTC
I am not sure about all previous versions but it seems that msvc 2013, not the CTP, also compiles fine with the 3rd definition, aka standard conforming. According to microsoft "Previous versions of Visual C++ would define special member functions even if the definition would be ill-formed." So I would not bet that versions prior to 2013 would work with the 3rd definition. However, that means that changing the macro to #if EIGEN_COMP_MSVC_STRICT && EIGEN_COMP_MSVC < 1800 would work for both msvc 2013 and CTP 2013. I would also assume that it would work for CTP 2015. Hopefully though that does not bring forth other issues.
Comment 7 Christos 2015-04-22 12:05:18 UTC
I should have said that the above change in the macro works fine in the scenarios below : 1)Eigen dev version a) msvc 2013 - OK b) msvc 2013 CTP - OK 1) Eigen 3.2.4 a) msvc 2013 - OK b) msvc 2013 CTP - Issue with MapBase which seem to have been resolved in dev version
Comment 8 Christoph Hertzberg 2015-04-23 11:43:04 UTC
Fixed in devel and 3.2 branch (as suggested only for MSVC 2013 and later): https://bitbucket.org/eigen/eigen/commits/45ad4b2fd2 https://bitbucket.org/eigen/eigen/commits/ad0c042b4d Regarding the issue with MapBase, please open a new bug.
Comment 9 Christos 2015-04-26 03:07:18 UTC
I see that there is one already related to MapBase and is marked as resolved http://eigen.tuxfamily.org/bz/show_bug.cgi?id=821
Comment 10 Christoph Hertzberg 2015-04-26 09:13:49 UTC
(In reply to Christos from comment #9) > I see that there is one already related to MapBase and is marked as resolved > http://eigen.tuxfamily.org/bz/show_bug.cgi?id=821 That fix should be included in 3.2.4, if that does not fix your problem, please provide an example that fails and re-open that bug.
Comment 11 Nobody 2019-12-04 14:32:19 UTC
-- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/1000.