[Issue 17415] std.conv.emplace does not forward arguments correctly
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Oct 16 13:07:39 UTC 2017
https://issues.dlang.org/show_bug.cgi?id=17415
Andrei Alexandrescu <andrei at erdani.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |andrei at erdani.com
--- Comment #3 from Andrei Alexandrescu <andrei at erdani.com> ---
S.init counts as an rvalue. We should treat it for all purposes the same as:
struct S
{
S init();
...
}
The way the value is produced does not entail a copy. Then the rvalue is moved
into the constructor of C, so the code is legit.
--
More information about the Digitalmars-d-bugs
mailing list