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 #7 from Alex Goltman <alex.golt...@gmail.com> --- Actually map does works on const NumRange, since it's declared as: auto map(Range)(Range r) if (isInputRange!(Unqual!Range)) Why shouldn't foreach work as well? It's not a critical bug, but fixing this would remove an annoyance which would make D users much less frustrated. Please don't dismiss this before really evaluating what would it take to fix it, because currently we don't see a reason for this not to just work, as map does already. --