This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Call of overloaded function is ambiguous ?
On Mar 15, 2002, Sebastian Ude <ude@handshake.de> wrote:
> That's clear to me - but why the different treatment of signed and unsigned
> integers ?
Because the type of `0' is `int', so it's a perfect match for f(int).
If there's only f(unsigned) and f(void*), both would need
conversions sequences, none of which would be better than the other,
so the call is ambiguous.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer