https://issues.dlang.org/show_bug.cgi?id=17771
Alex Goltman <alex.golt...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID |--- --- Comment #2 from Alex Goltman <alex.golt...@gmail.com> --- If it fails to implicitly copy to a non-const (e.g. a struct with a pointer inside) then so be it - but why not make it try at least? as in: Unqual!(typeof(range)) _r = range; It seems weird that foreach which intentionally copies the range to avoid modifying it will fail because a range is an unmodifiable const. --