[Bug c++/28093] Wrong overload resolution with templates and namespaces

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Jun 20 16:35:00 GMT 2006



------- 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



More information about the Gcc-bugs mailing list