Re: How can i increase max number recursive template expansions?

2013-07-10 Thread Ellery Newcomer
On 07/07/2013 01:22 PM, John Colvin wrote: On Sunday, 7 July 2013 at 19:55:26 UTC, QAston wrote: I have a large enum in my code (opcodes for a protocol) - using std.traits.EnumMembers gives me a recursive template error. How can i increase max number recursive template expansions? I don't

Re: How can i increase max number recursive template expansions?

2013-07-08 Thread bearophile
Simen Kjaeraas: However, you can amend std.traits.EnumMembers to work with larger enums by using this version: Worth putting in Phobos? Bye, bearophile

Re: How can i increase max number recursive template expansions?

2013-07-08 Thread John Colvin
On Monday, 8 July 2013 at 09:03:24 UTC, bearophile wrote: Simen Kjaeraas: However, you can amend std.traits.EnumMembers to work with larger enums by using this version: Worth putting in Phobos? Bye, bearophile I reckon so. It's rare to have such huge structs or classes that this sort of

Re: How can i increase max number recursive template expansions?

2013-07-08 Thread Simen Kjaeraas
On 2013-07-08, 11:03, bearophile wrote: Simen Kjaeraas: However, you can amend std.traits.EnumMembers to work with larger enums by using this version: Worth putting in Phobos? Filed: http://d.puremagic.com/issues/show_bug.cgi?id=10569 And created a pull request:

How can i increase max number recursive template expansions?

2013-07-07 Thread QAston
I have a large enum in my code (opcodes for a protocol) - using std.traits.EnumMembers gives me a recursive template error. How can i increase max number recursive template expansions?

Re: How can i increase max number recursive template expansions?

2013-07-07 Thread Simen Kjaeraas
On 2013-07-07, 21:55, QAston wrote: I have a large enum in my code (opcodes for a protocol) - using std.traits.EnumMembers gives me a recursive template error. How can i increase max number recursive template expansions? You can't. However, you can amend std.traits.EnumMembers to work

Re: How can i increase max number recursive template expansions?

2013-07-07 Thread John Colvin
On Sunday, 7 July 2013 at 19:55:26 UTC, QAston wrote: I have a large enum in my code (opcodes for a protocol) - using std.traits.EnumMembers gives me a recursive template error. How can i increase max number recursive template expansions? I don't think you can. Please file a bug report: even

Re: How can i increase max number recursive template expansions?

2013-07-07 Thread John Colvin
On Sunday, 7 July 2013 at 20:22:59 UTC, Simen Kjaeraas wrote: On 2013-07-07, 21:55, QAston wrote: I have a large enum in my code (opcodes for a protocol) - using std.traits.EnumMembers gives me a recursive template error. How can i increase max number recursive template expansions? You

Re: How can i increase max number recursive template expansions?

2013-07-07 Thread John Colvin
On Sunday, 7 July 2013 at 20:41:17 UTC, Simen Kjaeraas wrote: On 2013-07-07, 22:28, John Colvin wrote: We came up with almost identical solutions, posted within 19 seconds of each other! Sorta. Mine does repeated halving, and makes DMD run out of memory with 16384 enum members. Yours balks

Re: How can i increase max number recursive template expansions?

2013-07-07 Thread QAston
increase max number recursive template expansions? You can't. However, you can amend std.traits.EnumMembers to work with larger enums by using this version: import std.typetuple; template EnumMembers(E) if (is(E == enum)) { // Supply the specified identifier to an constant value