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

Andrei Alexandrescu <and...@erdani.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |and...@erdani.com

--- Comment #3 from Andrei Alexandrescu <and...@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.

--

Reply via email to