- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am wondering if the latest intel C++ compiler in 2013 sp1 update 1 supports implicit move constructor and assignment. I tested it the following code
#include <memory>
#include <iostream>
#include <algorithm>
using namespace std;
class A
{
public:
unique_ptr<int> m;
};
int main()
{
A a;
A b(std::move(a));
}
Compile it on windows as
icl main.cpp /Qstd=c++11
Errors
main.cpp
main.cpp(10): error #373: "std::unique_ptr<_Ty, _Dx>::unique_ptr(const
std::unique_ptr<_Ty, _Dx>::_Myt &) [with _Ty=int, _Dx=std::default_delete<int>]"
(declared at line 1447 of "C:\Program Files (x86)\Microsoft Visual Studio
11.0\VC\include\memory") is inaccessible unique_ptr<int> m;
^
detected during implicit generation of "A::A(const A &)" at line 16
compilation aborted for main.cpp (code 2)
Basically the 2nd line in the main function `A b(std::move(a));` is looking for copy constructor `A::A(const A &)` other than move constructor `A::A(const A &&)`. That is usual when no implicit move constructors are generated. But the compiler said it support implicit move constructor. I am confused. Thanks.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just had a similar issue with the same version of the Intel compiler on windows and came to the same conclusion. Will Intel fix this in the next release?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have reprocuded as you said ,I will enter this into bug-tracking system and will get you posted on any progress on this .Thank you for your issue submission.
Thank you.
--
QIAOMIN.Q
Intel Developer Support
Please participate in our redesigned community support web site:
User forums: http://software.intel.com/en-us/forums/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This will not be fixed since Mircosoft VS2013 doesn't support implicit move constructor yet.
We don't generate move constructors or assignment operators on Windows in order to be compatible with the MS compiler.
Thank you.
--
QIAOMIN.Q
Intel Developer Support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
First of all, Microsoft's November 2013 CPT supports implicit move member generation.
Second, Intel could allow to enable it by setting up an extension flag.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
These are supported under the hidden switch -Qoption,cpp,--gen_move_operations. I agree that Intel should enable this under the /Qstd=c++11 option. We don't support Microsoft CTPs so you will have to wait until the actual next MSVC++ studio release to complain about compatibility (:
I have entered DPD200255308 to track this defect. Thanks for reporting it.
Judy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Judith Ward (Intel) wrote:
These are supported under the hidden switch -Qoption,cpp,--gen_move_operations. I agree that Intel should enable this under the /Qstd=c++11 option. We don't support Microsoft CTPs so you will have to wait until the actual next MSVC++ studio release to complain about compatibility (:
I have entered DPD200255308 to track this defect. Thanks for reporting it.
Judy
That hidden switch changed my life! Is there another hidden switches?

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page