This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/50471] Qualified lookup fails to find template function
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 21 Sep 2011 10:19:21 +0000
- Subject: [Bug c++/50471] Qualified lookup fails to find template function
- Auto-submitted: auto-generated
- References: <bug-50471-4@http.gcc.gnu.org/bugzilla/>
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.