Inconsistent behavior when passing rvalue reference to function vs. function pointer - by darius256

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 747514 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 6/7/2012 4:37:43 PM
Access Restriction Public


When passing an rvalue reference to a primitive object to a function pointer, it appears that a copy of the object is made. This does not appear to occur when the function is called directly, or when the type being passed is a user-defined type.
Sign in to post a comment.
Posted by Microsoft on 4/29/2014 at 12:32 PM
Thank you for reporting this issue. This issue has been fixed in Visual Studio 2013. You can install a trial version of Visual Studio 2013 with the fix from:
Posted by Microsoft on 11/8/2012 at 10:06 AM
    A fix for this issue has been checked into the compiler sources. The fix should show up in the next release of Visual C++.

Xiang Fan
Visual C++ Team
Posted by Microsoft on 6/8/2012 at 6: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 6/7/2012 at 4:53 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(