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

Basile-z <[email protected]> changed:

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

--- Comment #2 from Basile-z <[email protected]> ---
this is a case where the global function (and non static) used as template
param becomes a (non-static) member.

But when the global func used as alias template parameter is explicitely
declared static this just works for example:


static int func(alias F)(int i)
{
    return i;
}

class C
{
    int a;
}

void main()
{
    auto a = &func!(C.a);
    assert(a(5) == 5);
    auto i = func!(C.a)(5);
}

I once tried to infer "static" but this broke the test suite... so people have
to put it by themselves even if it is weird to do so at the global scope.

--

Reply via email to