[Issue 17190] [REG2.072] isNumeric!string conflict std.traits std.string

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Feb 16 15:53:49 PST 2017


https://issues.dlang.org/show_bug.cgi?id=17190

Jonathan M Davis <issues.dlang at jmdavisProg.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |issues.dlang at jmdavisProg.co
                   |                            |m

--- Comment #1 from Jonathan M Davis <issues.dlang at jmdavisProg.com> ---
It's a side effect of std.string.isNumeric being templatized in 2.072 to work
with ranges rather than just strings. Before, it wasn't a template, so there
was no ambiguity. Now it is a template, so the two symbols are ambiguous. It's
unfortunate that it's caused problems, but it's not a bug. The only fix would
be to change one of their names, but that would then break any code that used
them. That being said, having a symbol that's an eponymous template have the
same name as a symbol that's a function is bad planning, because they won't
overload. Any code that imports both will have to either import one with a
different name, or it will need to use the full import path when using them.

--


More information about the Digitalmars-d-bugs mailing list