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

Andrei Alexandrescu <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #3 from Andrei Alexandrescu <[email protected]> ---
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.

--

Reply via email to