[Issue 20770] error: cannot pass types that need destruction as variadic arguments

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Apr 26 18:02:56 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=20770

kinke <kinke at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kinke at gmx.net

--- Comment #1 from kinke <kinke at gmx.net> ---
(In reply to Iain Buclaw from comment #0)
> There is no reason why internally these can't be passed by invisible
> reference.

Not so sure about that; normally, the compiler creates a temporary in the
caller, passes it by hidden ref, and lets the callEE destruct the temporary.

In the vararg case, there's no formal parameter, and the callee doesn't
destruct.

--


More information about the Digitalmars-d-bugs mailing list