Summary: Impossible to instantiate local template with
                    TypeTuple-foreach iterator variable.
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from 2011-06-01 01:14:15 PDT ---
The following code is rejected by DMD:

import std.typetuple;
void main(){
    int foo(int x)(){return x;}
    foreach(i;TypeTuple!(0)) foo!(i);

Error: template instance cannot use local 'i' as parameter to non-global
template foo(int x)

'i' is only a compile-time constant integral value at the point of
instantiation, therefore there is no reason why this should not work.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to