https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103162

--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Florin Iucha from comment #2)
> It indicates that it reports errors via exceptions.

Yes, but that doesn't mean 0 is a valid return value. The non-nothrow forms of
operator new also use exceptions to report errors, but that doesn't mean that
they can return 0 as a valid pointer. pmr::memory_resource is intended to work
the same way: either return a valid pointer to dereferencable memory, or throw
an exception. There is no third alternative, of returning an invalid or null
pointer value.

Reply via email to