dmd 2.049 bug with take and SList?

Nick Treleaven nospam at example.net
Thu Oct 14 07:14:14 PDT 2010


On Thu, 14 Oct 2010 07:18:48 +0000, Lars T. Kyllingstad wrote:

>>> You are creating an infinite recursion of templates.  For an array the
>>> return type of take() is the same array type.  For other ranges, the
>>> return type of take() is Take!Range.  So when you instantiate pyramid!
>>> Range, it instantiates pyramid!(Take!Range), and then
>>> pyramid!(Take!(Take! Range)), and so on ad infinitum.

OK, makes sense.

>>> A solution could be to make take!(Take!Range)() just return another
>>> Take! Range.  I can look into that, but you should file a bug report
>>> on it so it's not forgotten.
>>> 
>>> -Lars
>> 
>> http://d.puremagic.com/issues/show_bug.cgi?id=5052
> 
> Fixed.
> http://www.dsource.org/projects/phobos/changeset/2102

Thanks!


More information about the Digitalmars-d-learn mailing list