Forward ranges in Phobos v2

Steven Schveighoffer schveiguy at gmail.com
Wed Nov 3 02:34:00 UTC 2021


On 11/2/21 8:11 AM, Dukc wrote:

> - We also add some other function, or perhaps a flag to aforementioned 
> one, that can convert any v1 input ranges to v2 input range. 
> `valueRange` as default must not accept non-forward ranges, because then 
> it cannot guarantee that the result will be a value range.

How does phobos v2 view a non-class non-forward v1 range? This is the 
fundamental problem needing solving, because if you make copyability the 
defining trait, current v1 input-only ranges (e.g. `File.byLine`) are 
going to be miscategorized.

-Steve


More information about the Digitalmars-d mailing list