std::exception_ptr only partially comparable to null - by Alf P. Steinbach, except MS doesn't accept it

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.


1
0
Sign in
to vote
ID 727374 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 2/29/2012 4:23:17 PM
Access Restriction Public
Moderator Decision Sent to Engineering Team for consideration

Description

As of Visual C++ 10.0,

#include <exception>

int main()
{
    std::exception_ptr const    p   = std::current_exception();
    
    (p == nullptr);             // OK
    (p != nullptr);             // Bah!
    (p == 0);                   // OK
    (p != 0);                   // Nix!
    (!!p);                      // Nyet!
    (static_cast<bool>( p ));   // Nope!
}
Sign in to post a comment.
Posted by Microsoft on 4/29/2014 at 12:24 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 3/1/2012 at 6:54 PM
Hi,

Thanks for reporting this bug. It was previously reported to us at http://connect.microsoft.com/VisualStudio/feedback/details/695529/std-exception-ptr-does-not-satisfy-the-requirements-of-nullablepointer and the fix is available in 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:23 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:42 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)