On Fri, 30 Aug 2024 at 19:21, Thiago Macieira <thiago.macie...@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. -- Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development