[Issue 21586] Struct dtor is called twice if struct is created inside ternary operator

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jan 27 10:27:54 UTC 2021


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

Jack Applegame <japplegame at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |japplegame at gmail.com

--- Comment #3 from Jack Applegame <japplegame at gmail.com> ---
But if you add a copy constructor to the structure, no temporary copy is
created.
It's weird, but acceptable.

--


More information about the Digitalmars-d-bugs mailing list