[Development] Disavowing the Lakos Rule for Q_ASSERT
Ville Voutilainen
ville.voutilainen at gmail.com
Tue Aug 27 08:18:02 CEST 2024
On Tue, 27 Aug 2024 at 05:23, Thiago Macieira <thiago.macieira at intel.com> wrote:
>
> On Monday 26 August 2024 17:09:54 GMT-7 Ville Voutilainen wrote:
> > I would think the callee takes over the responsibility of destroying
> > the parameters when they have all been initialized
> > (so that you actually end up in the callee, duh), and before that
> > point the caller has to do it for cases where they don't all
> > construct.
>
> In the case where one fails to construct, sure, but then the callee hasn't
> been called yet.
>
> My point is that in some ABIs, the callee destroys the parameters passed by
> value. This is an observable difference if the destructor may throw (which it
> may if it has a precondition).
Right. With the facilities currently proposed, you shouldn't declare
contract checks for destructors.
We need more toys to make that feasible.
More information about the Development
mailing list