Not sure what InputRange is defined as atm, but I don't think
anything should have to define init to be a valid inputrange.
I've never said anything about inheriting from InputRange, just
that I'd take an InputRange as a parameter. Anyway I changed my
signature to
Result parse(T)(T lines) if(isInputRange!T && is(ElementType!T ==
string));
Still not sure if that's the best way to do it, but it definitely
is the one th
I wanna write a parser that can read the input text from an
arbitrary source. That's going to be files for most of the time,
but I don't want to unnecessarily limit it. It's a line based
format, so I supposed InputRange!string would do in this case?
I've looked at std.stream, but it says in big red scary letters
that I probably shouldn't be using it. Is there a suitable
replacement? If not, I'd just roll my own and provide a couple of
templates to automatically generate wrappers for them.