Home Dashboard Directory Help
Search

VC11 does not compile valid code using rvalue references by Xentrax [Vyacheslav Lanovets]


Status: 

Closed
 as Deferred Help for as Deferred


1
0
Sign in
to vote
Type: Bug
ID: 767153
Opened: 10/12/2012 1:32:46 AM
Access Restriction: Public
1
Workaround(s)
view
0
User(s) can reproduce this bug

Description

VC++ 17.00.50727.1 for x86 does not compile valid C++ code using rvalue references.

According to guys om comp.lang.c++.moderated this is a bug in VC compiler:
https://groups.google.com/d/msg/comp.lang.c++.moderated/HjcLTUvohBk/t5IjszlaG1wJ

Details
Sign in to post a comment.
Posted by Microsoft on 10/12/2012 at 2:01 AM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 10/12/2012 at 1:50 AM
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 Xentrax [Vyacheslav Lanovets] on 10/12/2012 at 1:34 AM
std::move does the trick:

fi(std::move(getA()).y);