[Development] Disavowing the Lakos Rule for Q_ASSERT
Ville Voutilainen
ville.voutilainen at gmail.com
Sat Aug 31 20:01:34 CEST 2024
On Fri, 30 Aug 2024 at 19:21, Thiago Macieira <thiago.macieira at intel.com> wrote:
> For the non-simple cases, we may need two macros, one that expands to:
>
> noexcept(noexcept(std::string_view{"", 1}))
>
> and the other that expands to the pre() specifier.
Right. Maybe
void f(int x) Q_NARROW_CONTRACT_NOEXCEPT Q_PRE(x >= 0) ;
and then, if contracts are enabled, that noexcept expands to nothing,
and if contracts are disabled,
the pre expands to nothing and that noexcept expands to a noexcept.
More information about the Development
mailing list