This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Call of overloaded function is ambiguous ?
- From: Sebastian Ude <ude at handshake dot de>
- To: gcc at gcc dot gnu dot org
- Date: Sat, 16 Mar 2002 00:29:30 +0100
- Subject: Re: Call of overloaded function is ambiguous ?
- References: <orhenhsay6.fsf@free.redhat.lsd.ic.unicamp.br>
- Reply-to: ude at handshake dot de
On 15 Mar 2002, aoliva@redhat.com (Alexandre Oliva) wrote:
> Date: 15 Mar 2002 19:49:53 -0300
> To: ude@handshake.de
> From: aoliva@redhat.com (Alexandre Oliva)
> CC: gcc@gcc.gnu.org
> Subject: Re: Call of overloaded function is ambiguous ?
[...]
> > 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.
Ah - I see.
Thanks !
- Sebastian