On Sunday, 27 April 2014 at 00:04:15 UTC, ketmar wrote:
but this is definetely bug, i think:

void main() {
  import std.stdio : writeln;
  import std.conv : to;
  writeln(to!int("29a", 16)); // 666
writeln(to!int("+29a", 16)); // Unexpected '+' when converting from type string base 16 to type int //writeln(to!int("-29a", 16)); // Unexpected '-' when converting from type string base 16 to type int
}


it compiles, but throws exceptions on last two lines with writeln(). base 10 accepts '+' and '-' though. why other bases aren't?

Reply via email to