More range woes: composed ranges are unsafe to return from functions

Jonathan M Davis jmdavisProg at gmx.com
Tue Oct 16 12:20:50 PDT 2012


On Tuesday, October 16, 2012 12:15:01 H. S. Teoh wrote:
> I'm at a loss as to where the bug in my code could be, since I have two
> identical copies of the same code, one works, and the other doesn't, and
> the only difference between them is that one is returning a range from a
> separate function.

You'd probably have to reduce your code piece by piece until it starts acting 
the same in both cases and then try and determine the smallest example 
possible using that. Then it could become fairly clear whether it's a library 
bug or a compiler bug. But narrowing it down is likely to be rather unpleasant 
regardless.

- Jonathan M Davis


More information about the Digitalmars-d mailing list