C++ istream / ostream equivalent ?
Jesse Phillips
jessekphillips+D at gmail.com
Thu Dec 2 13:48:40 PST 2010
I'm currently looking at ways to improve std.conv.to. And this might be a good area to improve std.conv.parse.
For example parse could be made to look for a method static readFrom!(T)() if(isSomeString!T) and maybe to should take advantage of it.
auto foo = to!A(someString);
I'd have to require the entire string be used to convert, while parse would not (consistent with other differences). So you'd likely use parse:
try while(true) {
a[i++] = parse!A(someString);
} catch ...
Opinions?
More information about the Digitalmars-d-learn
mailing list