Feasibility of a std.encoding.safeDecode overload for InputRanges?

E.S. Quinn via Digitalmars-d digitalmars-d at puremagic.com
Sat Jun 20 09:24:06 PDT 2015


Currently, std.encoding.safeDecode seems to only work on Random 
Access Ranges that have a .length property. (So essentially 
arrays and array-like objects), but I would very much like to be 
able to safeDecode strings that have lazy range-based processing 
applied to them (which often ends up with only an InputRange).

Given that throwing-decodes work just fine on input ranges, would 
it be possible to let safe decodes work for them as well?


More information about the Digitalmars-d mailing list