Home Dashboard Directory Help
Search

system_error::what() non-conformant return value by PowerGamer1


Status: 

Closed


1
0
Sign in
to vote
Type: Bug
ID: 752770
Opened: 7/7/2012 11:05:37 AM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

When user-defined error message for system_error constructor is specified, return value of what() method of system_error contains only user message. This behavior does not conform to the C++11 standard, that states:

19.5.6.2 Class system_error members
const char *what() const noexcept;
14 Returns: An NTBS incorporating the arguments supplied in the constructor.
[ Note: The returned NTBS might be the contents of what_arg + ": " + code.message().—end note ]
Details
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: http://go.microsoft.com/?linkid=9832436
Posted by Microsoft on 12/17/2012 at 5:12 PM
Hi,

Thanks for reporting this bug. We've fixed it, and the fix will be available in the next release of our C++ Standard Library implementation.

If you look at VC11's implementation of <system_error>, you'll see that Dinkumware's original and conformant implementation of what() was commented out for Microsoft-specific reasons (our _ITERATOR_DEBUG_LEVEL support and our separately compiled msvcp110[d].dll prevent us from using std::string as a data member here). We've reworked the implementation to be both conformant (following the Standard's suggestion exactly) and Microsoft-compatible.

Note: Connect doesn't notify me about comments. If you have any further questions, please E-mail me.

Stephan T. Lavavej
Senior Developer - Visual C++ Libraries
stl@microsoft.com
Posted by Microsoft on 7/9/2012 at 12:02 AM
Thank you for submitting feedback on Visual Studio 11 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 Microsoft on 7/7/2012 at 11: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.