Home Dashboard Directory Help
Search

MSVC10 using copy constructor instead of move by Mooing Duck


Status: 

Closed
 as Deferred Help for as Deferred


1
0
Sign in
to vote
Type: Bug
ID: 778513
Opened: 2/4/2013 9:29:37 PM
Access Restriction: Public
1
Workaround(s)
view
0
User(s) can reproduce this bug

Description

When compiling the code below, the output should obviously be "move", but instead, I see "copy". The compiler should be implicitly defining a move constructor for the track class that uses the move constructor of the root member, but seems to be using a defaulted copy constructor instead. Adding explicit move and copy constructors to the track class results in the expected behavior. (Discovered in MSVC10 express, confirmed in VS11 with November CRT)
Details
Sign in to post a comment.
Posted by Microsoft on 2/5/2013 at 1: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 2/4/2013 at 9: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.
Posted by Mooing Duck on 3/11/2013 at 9:04 PM
add explicit copy/move constructors