Default Move Constructor in Visual Studio 2013 (Update 3)

前端 未结 1 1809
忘了有多久
忘了有多久 2020-12-02 01:51

I\'ve been able to find multiple conversations about this in the past (e.g. here), but such conversations are from quite a while ago. The code I have a question about is:

相关标签:
1条回答
  • 2020-12-02 02:29

    I know that you cannot mark move constructors as default, but that does not imply that the compiler does not support generating default move constructors all-together

    Unfortunately, that's exactly what that means. VS2013 does not support implicit generation of move constructors and move assignment operators. If it did, they wouldn't really have a reason to disallow the = default syntax, especially since you're allowed to do that for the copy constructor and assignment operator.

    Quoting MSDN: Support For C++11 Features (Modern C++)

    "Rvalue references v3.0" adds new rules to automatically generate move constructors and move assignment operators under certain conditions. However, this is not implemented in Visual C++ in Visual Studio 2013, due to time and resource constraints.

    0 讨论(0)
提交回复
热议问题