This is the mail archive of the gcc-bugs@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]

Re: Overload resolution error: gcc version egcs-2.91.60


> 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


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