[cxx-abi-dev] Passing non-trivial types through ...
Dennis Handly
dhandly at cup.hp.com
Thu Aug 14 00:51:25 UTC 2014
>From: John McCall <rjmccall at apple.com>
>Id be happier if you disavowed the previous implementation of the
>extension, of course. :)
Well, that's what "undefined" means. :-)
>So, you suppress destruction completely of the argument, and it potentially
>goes undestructed?
Yes, and since we don't call the copy constructor, everything is balanced.
>I dont see how we can prevent it
John.
You just say that this use of va_arg produces a const Foo& and don't allow
Foo to be mentioned. I suppose you could allow a "const Foo" too.
With your current idea, did you plan to invoke copy constructor or copy
assignment operator for:
Foo f = va_arg(ap, Foo);
I would assume you would have to do that, since the user can "rewind" and
use va_start ... va_end multiple times.
More information about the cxx-abi-dev
mailing list