This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Overload resolution error: gcc version egcs-2.91.60
- To: brown at mail dot eecis dot udel dot edu
- Subject: Re: Overload resolution error: gcc version egcs-2.91.60
- From: "Martin v. Loewis" <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Tue, 10 Aug 1999 22:05:16 +0200
- CC: gcc-bugs at gcc dot gnu dot org
- References: <37B02437.C85D7D61@cis.udel.edu>
> The error message (appearing below) says that there is an ambiguity
> as to which operator+ should be used. However, there is no
> ambiguity here since w cannot be cast down to an int owing to the
> fact the cast to an int is private.
No. Access control happens after overload resolution in C++. Name
lookup finds all candidates; if the selected candidate is not
accessible, the program is in error.
Regards,
Martin