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++/50471] Qualified lookup fails to find template function


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

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-09-21 10:19:21 UTC ---
The name lookup is delayed until instantiation, however [temp.dep.candidate]
says that the qualified lookup in g1 only finds declarations visible at the
point of definition of g1:

For a function call that depends on a template parameter, the candidate
functions are found using the usual lookup rules (3.4.1, 3.4.2, 3.4.3) except
that:
â For the part of the lookup using unqualified name lookup (3.4.1) or qualified
name lookup (3.4.3), only function declarations from the template definition
context are found.
â For the part of the lookup using associated namespaces (3.4.2), only function
declarations found in either the template definition context or the template
instantiation context are found.


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