http://d.puremagic.com/issues/show_bug.cgi?id=4379



--- Comment #1 from David Simcha <dsim...@yahoo.com> 2010-06-23 19:57:24 PDT ---
Actually, this appears to be related to the total size of the loop body being
generated at compile time.  Nesting has nothing to do with it.  The cutoff
appears to be (of all numbers) 198 elements.

import std.stdio, std.typetuple;

// CTFE function to generate a huge tuple.
string generateHugeTuple() {
    string ret = "alias TypeTuple!(";

    foreach(outer; 0..198) {
        ret ~= '1';
        ret ~= ',';
    }

    ret = ret[0..$ - 1];  // Drop last ,
    ret ~= ") LetterTuple;";
    return ret;
}

mixin(generateHugeTuple());

void main() {
    foreach(letter; LetterTuple) {
        writeln(letter);
    }
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to