On 05/09/2016 03:44 AM, Dicebot wrote:

> Ali version generates a compile-time switch for index

I think it's a run-time switch, generated by a compile-time foreach:

E front() {
    final switch (index) {                    // <-- RUNTIME
        /* static */ foreach (i, arg; Args) { // <-- COMPILE TIME
            case i:                           // <-- RUNTIME
                return arg;                   // <-- RUNTIME
        }
    }
}

Quite confusing. :)

> that returns either literals or external variables by
> referencing their symbol directly.

I see. So, a parameter pack (AliasSeq) uses 'alias' template parameters for symbols. Makes sense...

Ali

Reply via email to