isInputRange is false for non-copyable types

Uranuz neuranuz at gmail.com
Fri Apr 20 17:35:32 UTC 2018


> foreach(ref e; range)
> {
> }

On idea is to have `ref` foreach to say that you would like to 
iterate your range without copying. The syntax could be:

foreach(e; ref range)
{
}

or:
ref foreach(e; range)
{
}
At least it will not break existing code. But this means that in 
each case you should make a decision about `ref`/non ref.



More information about the Digitalmars-d mailing list