On Thursday, 4 October 2012 at 09:43:08 UTC, monarch_dodra wrote:

The current implementation for "isAssignable" is
//----
template isAssignable(Lhs, Rhs)
{
    enum bool isAssignable = is(typeof({
        Lhs l = void;
        void f(Rhs r) { l = r; }
        return l;
    }));
}

OT - Is there any reason for disabling UFCS for this?

template isAssignable(Lhs, Rhs)
{
    enum bool isAssignable =
    {
        Lhs l = void;
        void f(Rhs r) { l = r; }
        return l;
    }.typeof.is;
}

Reply via email to