UFCS does not work in this template where the normal function call syntax will work:

template test(alias fun) {
        auto test(T)(T n) {
                return n.fun;
        }
}

Is this the same as the inability to use UFCS with functions declared in the same scope as the call? Is there no way to address this issue without messing with calling class members (that is what I understand to be the reason for the limitation on UFCS, I may have misunderstood). It also prevents the use of function literals in UFCS chains which seems like a great pity and the loss of what should be a very natural part of the language.

Reply via email to