More range woes: std.array.save is invalid

H. S. Teoh hsteoh at quickfur.ath.cx
Thu Dec 20 07:23:48 PST 2012


On Thu, Dec 20, 2012 at 12:08:24AM -0800, Jonathan M Davis wrote:
> On Wednesday, December 19, 2012 23:44:12 H. S. Teoh wrote:
> > Yes, which means many current algorithms that take a range of ranges
> > and returns a wrapper range are wrong, because they assume that the
> > wrapper range can be a forward range when both the container and the
> > subranges are forward ranges, but this is not a sufficient condition
> > in the general case.
> 
> Then they have bugs in their implementation which need to be fixed.
> There's nothing wrong with std.array.save. It's doing the right thing.
[...]

OK, so the subject line is misleading.

But the bigger issue is that wrappers of forward ranges of forward
ranges can only be input ranges, in spite of the fact that, in theory,
you can save each component of the given range of ranges.


T

-- 
Nobody is perfect.  I am Nobody. -- pepoluan, GKC forum


More information about the Digitalmars-d mailing list