[propagation]/5 says
An object of type exception_ptr can be compared for equality with a null
pointer constant
#include <exception>

int main()
{
    std::exception_ptr p;
    return (p == 0);
}

eptr.cc: In function ‘int main()’:
eptr.cc:7: error: ambiguous overload for ‘operator==’ in ‘p == 0’
eptr.cc:7: note: candidates are: operator==(void
(std::__exception_ptr::exception_ptr::*)(), void
(std::__exception_ptr::exception_ptr::*)()) <built-in>
/dev/shm/wakelyjo/insroot/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/exception_ptr.h:148:
note:                 bool std::__exception_ptr::operator==(const
std::__exception_ptr::exception_ptr&, const
std::__exception_ptr::exception_ptr&)


-- 
           Summary: [C++0x] std::exception_ptr comparisons
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jwakely dot gcc at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40296

Reply via email to