www.digitalmars.com         C & C++   DMDScript  

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

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: simen.kjaras gmail.com


--- Comment #0 from Simen Kjaeraas <simen.kjaras 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: -------
Jul 08 2013
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10569



--- Comment #1 from Simen Kjaeraas <simen.kjaras gmail.com> 2013-07-08 04:47:35
PDT ---
Pull request:

https://github.com/D-Programming-Language/phobos/pull/1400

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