[Issue 10569] New: std.traits: EnumMembers, isExpressionTuple, isTypeTuple & Largest balks at large input

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jul 8 04:46:22 PDT 2013


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

           Summary: std.traits: EnumMembers, isExpressionTuple,
                    isTypeTuple & Largest balks at large input
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: trivial
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: simen.kjaras at gmail.com


--- Comment #0 from Simen Kjaeraas <simen.kjaras at gmail.com> 2013-07-08 04:46:19 PDT ---
The templates EnumMembers, isExpressionTuple, isTypeTuple and Largest in
std.traits fail due to recursive template expansion when instantiated with
large inputs (>500):


    import std.traits : EnumMembers;

    mixin({
        import std.conv : to;
        string s = "enum m {";
        foreach (i; 0..500) {
            s ~= "m" ~ to!string(i) ~ ",";
        }
        return s ~ "}";
    }());

    EnumMembers!m; //  Error: template instance
std.traits.EnumMembers!(m).WithIdentifier!("m498") recursive expansion

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


More information about the Digitalmars-d-bugs mailing list