Home Dashboard Directory Help
Search

std::reference_wrapper fails to wrap reference to object of abstract class by Alf P. Steinbach, except MS doesn't accept it


Status: 

Closed
 as Fixed Help for as Fixed


1
0
Sign in
to vote
Type: Bug
ID: 727368
Opened: 2/29/2012 3:53:28 PM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
1
Workaround(s)
view
0
User(s) can reproduce this bug

Description

std::reference_wrapper fails to wrap reference to object of abstract class.
it oes not compile.
the std lib code attempts to instantiate the class.
Details
Sign in to post a comment.
Posted by Microsoft on 3/1/2012 at 7:04 PM
Hi,

Thanks for reporting this bug. We've already fixed it, and the fix will be available in VC11 RTM. (However, the fix didn't get into the VC11 Beta.)

If you have any further questions, feel free to E-mail me at stl@microsoft.com .

Stephan T. Lavavej
Visual C++ Libraries Developer
Posted by MS-Moderator09 [Feedback Moderator] on 2/29/2012 at 7:10 PM
Thank you for submitting feedback on Visual Studio 2010 and .NET Framework. Your issue has been routed to the appropriate VS development team for review. We will contact you if we require any additional information.
Posted by MS-Moderator01 on 2/29/2012 at 6:41 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 Alf P. Steinbach, except MS doesn't accept it on 2/29/2012 at 3:55 PM
Define your own trivial ref wrapper (like 6 to 10 lines of code) instead of using the bungled & apparently extremely complicated implementation of std::reference_wrapper in Microsoft's C++ standard library.
File Name Submitted By Submitted On File Size  
foo.cpp 2/29/2012 209 bytes