Testing lazy ranges in post-conditions

bearophile via Digitalmars-d digitalmars-d at puremagic.com
Mon Nov 24 06:20:01 PST 2014


Peter Alexander:

> Chunks.save should also be const, so result.save.{...} should 
> work.

But it doesn't. Should I have to file two bug reports (ERs) on 
iota and chunks?


> It becomes a real problem with input ranges, because you can't 
> save them. That makes sense though, as there is no way to 
> consume the result in a post-condition check that doesn't 
> consume it.

I agree.

Bye,
bearophile


More information about the Digitalmars-d mailing list