[Development] Disavowing the Lakos Rule for Q_ASSERT

Ville Voutilainen ville.voutilainen at gmail.com
Tue Aug 27 02:06:43 CEST 2024


On Tue, 27 Aug 2024 at 02:10, Thiago Macieira <thiago.macieira at intel.com> wrote:
> > A contract violation turned into an exception cannot escape out of a
> > noexcept function. So it won't bubble up.
>
> I think that's a mistake, but since I don't use exceptions, I also don't care.

It isn't. It avoids functions being conditionally noexcept depending
on whether their contract
is checked.

> Don't use the violations-become-exceptions mode or do accept that that turns
> into a std::terminate().

I'm curious what you intend to do with a Qt-wide permission to put
noexcepts on functions that
have preconditions. It's not a performance benefit for things that
aren't invoked inside move operations.


More information about the Development mailing list