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

[email protected] changed:

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

--- Comment #2 from [email protected] ---
Golfed:

union Wrapper(T) {
        T x;
        this(inout T value) {
                this.x = value;
        }
        this(ref scope inout Wrapper!T rhs) inout {
                this.x = rhs.x;
        }
}

void f(const ref Wrapper!string x) {
        auto r = Wrapper!(typeof(x))(x);
}

--

Reply via email to