On Tuesday, 21 April 2015 at 23:33:38 UTC, ketmar wrote:
On Tue, 21 Apr 2015 15:48:25 -0700, Jonathan M Davis via Digitalmars-d wrote:
auto h = r.front;

the thing is that chain, or filter, or other algorithms are perfectly able to work with such ranges, yet it is forbidden now. it looks like
arbitrary limitation to me.

why not introducing a new trait "isNonCopyingInputRange" with the old definition and define "isInputRange = isNonCopyingInputRange and compiles( auto h = r.front)" and then make filters and chain and all algorithms that don't need copying requiring only the new trait?

Reply via email to