C++ Logo


Advanced search

Re: What is the difference between "Throws: Nothing." and noexcept(true)

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Wed, 15 Jul 2020 15:45:15 +0300
On Wed, 15 Jul 2020 at 15:27, Peter C++ via Std-Discussion
<std-discussion_at_[hidden]> wrote:
> Just to make my statement:
> Those functions use their return value to do error reporting. I would be shocked about a design that additionally would throw exceptions.
> And they pretend to be low level.
> Should I file a library issue to make them noexcept. Or is that too much of Design that lewg needs to be involved?

There is no library issue here to report. These functions as specified
are consistent with the noexcept guidelines.
If you wish to change them to be guaranteed to be noexcept and thus
prevent implementations that wish
to throw out of them in some debug mode, LEWG is your huckleberry. The
three implementations of these
functions that I can see already make them noexcept anyway.

Received on 2020-07-15 07:48:43