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]
Other format: [Raw text]

[Bug c++/13590] unexpected overload resolution


------- Additional Comments From boris at kolpackov dot net  2004-01-06 23:15 -------
Subject: Re:  unexpected overload resolution

> That's not a good example. The using directive for A::f and B::f create 
> an ambiguity, but this only needs to be detected when you try to call 
> one of the functions, i.e. during overload resolution, not when the 
> using directive is parsed. 

Agree.

> However, you call f(int), and there is no ambiguity in this case.

Doesn't the overload resolution happens when I call f(int) ? And
according to what you just said it should be flagged as an error.
 
And thus, I think, it's a very good example ;-)

What I was trying to say is that when the same processes (overload 
resolution) happens in similar situations (ambiguilty in class 
inheritance vs ambiguilty in using directive) it would be nice if 
it had the same result (consistency).


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13590


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