[Issue 15842] struct is being copied when returned directly

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jun 12 17:39:51 UTC 2018


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

Steven Schveighoffer <schveiguy at yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schveiguy at yahoo.com

--- Comment #5 from Steven Schveighoffer <schveiguy at yahoo.com> ---
What is there to test? Either way is valid -- you can have the struct
constructed in one location, and then moved to the return value, or you can
have it constructed in place for the return value. There is no postblit or
dtor, so the struct is movable without any notification.

IMO, this should be resolved INVALID.

--


More information about the Digitalmars-d-bugs mailing list