conv.to for radixes
Jonathan M Davis
jmdavisProg at gmx.com
Tue Nov 22 19:59:33 PST 2011
On Wednesday, November 23, 2011 04:39:37 Andrej Mitrovic wrote:
> Is there any special reason why conv.to doesn't work with radixes, and
> we have to use parse instead?
>
> import std.conv;
> import std.stdio;
>
> void main()
> {
> writeln(parse!int("ff", 16)); // ok
> writeln(to!int("ff", 16)); // NG
> }
I'm not aware of any technical reason why it isn't feasible. Open an
enhancement request. You can ping Kenji Hara about it if you'd like too, since
he's likely the one to do it, since he's the one who's been actively working
on std.conv.
- Jonathan M Davis
More information about the Digitalmars-d-learn
mailing list