//Inconsistent behavior
import std.conv : to;
auto workWithFloat = to!float("1_000");
auto failWithInt = to!int("1_000");
auto failWithInt = to!uint("1_000");
Comment #1 by b2.temp — 2020-02-08T16:04:02Z
In theory underscores should throw when found in an argument of `to!float`.
This other issue (https://issues.dlang.org/show_bug.cgi?id=9797) was closed for the rationale that is that std.conv.to is not made to handle special D flavors of number literals but is rather a generic handler.
Note that octal and hexString handle underscores for another reason, that is that they were made specifically to replace literals.
Comment #2 by bugzilla — 2021-04-21T18:08:53Z
*** This issue has been marked as a duplicate of issue 15526 ***