On Wed, 14 Sep 2011 09:10:28 -0400, Dmitry Olshansky
<[email protected]> wrote:
On 14.09.2011 16:58, Steven Schveighoffer wrote:
On Wed, 14 Sep 2011 08:36:53 -0400, Dmitry Olshansky
<[email protected]> wrote:
On 14.09.2011 16:29, Andrea Fontana wrote:
I've tried with dmd 2.054 64bit and 2.056 64bit both compiled by
myself on my ubuntu machine.
Yes, it's a bug, they should overload each other, it exists since
std.regex inclusion maybe, I tried to fix this one in the past and
failed.
There is something about lookup rules I obviously don't get.
No, the overload rules are specific. Two modules cannot overload each
other. Otherwise, adding an import can change calls.
Please read this part of the spec:
http://www.d-programming-language.org/function.html#overload-sets
Anti-hijacking? I knew it, but it's not applicable here.
I mean these functions should not conflict because their argument types
do not intersect. You can't mistake Regex for String, these checks are
present in template constraints, is it not enough?
I think there is more to it. The algorithm to process overloading from
multiple overload sets is quite complex, and one of the problems of C++.
I can't remember the name of it, but D just avoids it by not allowing
multiple overload sets.
In any case, it's not a bug, it's by design.
-Steve