On Sunday, 28 January 2018 at 20:42:52 UTC, Jonathan M Davis
wrote:
There is nothing incorrect about the error message. The
compiler looked at all of the functions in the overload set,
and it found none that matched. The reason that it found none
that matched was because it couldn't find any function template
where those arguments passed the template constraint, and it
tells you so.
So, there is no bug here in the sense that the compiler is
telling you the wrong thing. You can certainly open a bug
report arguing that the error messages isn't human-friendly
enough and suggest alternatives, and something along those
lines may be implemented, but the message isn't actually wrong.
So, feel free to open a bug report.
However, you're not going to get an error message that says
anything like "the arguments aren't the same type." The
compiler doesn't understand what the template constraint means
in "human terms." It just knows whether it's true or false, and
in this case, if you provide arguments that don't have a common
type that they implicitly convert to, then the template
constraint will fail. But ultimately, you're going to have to
read the template constraint and figure out why the arguments
are failing.
- Jonathan M Davis
I would not complain if there were multiple functions just like
error said. But the set contains only one making it not a set
anymore and it says nothing about constraints.
I downloaded dmd source. Might figure out something myself
tomorrow