__THROW → __NOEXCEPT

Florian Weimer fweimer@redhat.com
Tue Jun 4 16:34:59 GMT 2024


* Paul Eggert:

> On 2024-06-04 05:39, Florian Weimer wrote:
>> * Adhemerval Zanella Netto:
>> 
>>>> (Who decided __THROW means "doesn't throw" ?)
>>> That is an excellent question...
>> It stands for throw(), the old version of the C++ noexcept specifier
>> which could also contain an explicit exception list.
>
> Would anyone object to renaming __THROW to __NOEXCEPT? C++11 renamed
> 'throw' to 'noexcept' and C++20 removed 'throw', so using __NOEXCEPT
> would make headers more readable to today's users.

I'm not sure if it's worth the update churn, but please make it
__NOEXCEPT_LEAF and use __NOEXCEPT for for __THROWNL.

And we really can't remove the old macros, they are widely used.

Thanks,
Florian



More information about the Libc-alpha mailing list