Home Dashboard Directory Help

Implicit move constructor does not work properly by summerlight


 as Deferred Help for as Deferred

Sign in
to vote
Type: Bug
ID: 785972
Opened: 4/30/2013 11:22:40 PM
Access Restriction: Public
User(s) can reproduce this bug


#include <string>
#include <cstdio>

struct test
std::string a;

int main()
test a;
a.a = "test";
test b = std::move(a);
printf("%s, %s", a.a.c_str(), b.a.c_str());

Above code is the example that generates implicit move constructor which should call move constructor of the internal member 'std::string a'. However, the member gets copied instead of moved.
Sign in to post a comment.
Posted by Microsoft on 5/7/2013 at 4:50 PM
Hi summerlight,

You are correct in that this is nonstandard behavior, but we've decided not to address this issue at this time. We will, however, consider fixing the behavior in a future release of Visual Studio.

Karl Niu
VC++ Team
Posted by Microsoft on 5/2/2013 at 12:22 AM
Thank you for submitting feedback on Visual Studio and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by Microsoft on 4/30/2013 at 11:50 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.