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