This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/28093] Wrong overload resolution with templates and namespaces
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Jun 2006 15:57:26 -0000
- Subject: [Bug c++/28093] Wrong overload resolution with templates and namespaces
- References: <bug-28093-5469@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-06-20 15:57 -------
No, this is invalid, as both Base and Deriv are in the global namespace so the
ident namespace is not looked at again after the parsing of the template. If
either of them were in the ident namespace, GCC will look back into the ident
namespace for argument dependent lookup.
So what is happening here is that an overloaded set for foo is being generated
when func is parsed and then it is instainated, a secondary overloaded set is
generated for argument dependent lookup which is only within the namespace
where the type is defined.
3.4 was incorrect in calling generic and did not conform to the standard at
all.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|major |normal
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28093