This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Call of overloaded function is ambiguous ?




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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]