Testing lazy ranges in post-conditions
Peter Alexander via Digitalmars-d
digitalmars-d at puremagic.com
Mon Nov 24 07:10:15 PST 2014
On Monday, 24 November 2014 at 14:20:02 UTC, bearophile wrote:
> 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?
I suppose chunks should be inout, because you might want mutable
chunks.
You could file bug reports, but you can't really add const/inout
manually in templates. The dependencies on the const-ness of
template parameters makes it unmanageable. You need it to be
inferred.
See:
https://issues.dlang.org/show_bug.cgi?id=7521
https://issues.dlang.org/show_bug.cgi?id=8407
More information about the Digitalmars-d
mailing list