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

Nick Treleaven <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=11517
            Summary|Can't use alias this with   |Can't use alias this with
                   |struct static member        |static namespaces
           Severity|minor                       |enhancement

--- Comment #2 from Nick Treleaven <[email protected]> ---
The pattern is probably more useful with named mixin members:

struct S
{
    template T()
    {
        int i;
    }
    mixin T m;
    //alias m.i this; //error
    // workaround
    alias get this;
    alias get = m.i;
}

--

Reply via email to