------- Comment #14 from jwakely dot gcc at gmail dot com 2010-06-02 17:26
-------
(In reply to comment #10)
> AFAIK, the following code should work but does not anymore cause of this bug
> fix:
>
> std::exception_ptr e;
>
> if (e)
> {
> /* ... */
> }
I'm fairly sure that's not valid.
That relies on an implicit conversion to bool, not a contextual conversion to
bool, and 18.8.5 also says "exception_ptr shall not be implicitly convertible
to any arithmetic, enumeration, or pointer type."
This should work though:
if (bool(e))
I'll fix that and add tests to check implicit conversions don't work (I think
that requirement is also new since exception_ptr was last worked on.)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40296