When should value parameters be destroyed?

Martin von Loewis loewis at informatik.hu-berlin.de
Sat Sep 30 10:09:02 UTC 2000


> But the access check is compile-time, right?  There's nothing to
> prevent a compiler from doing it at the call, but still calling the
> parameter destructor in the callee (without checking), right?

Exactly, yes.

> Yes, it does.  The second bullet in 3.1.1 leaves parameter construction
> to the caller, which can elide it when allowed to do so, e.g. in your
> example below.  (The fourth bullet is a typo -- "copy constructor"
> should have read "destructor," and will soon.)

Sounds good, thanks.

Martin




More information about the cxx-abi-dev mailing list