public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/50471] Qualified lookup fails to find template function
Date: Wed, 21 Sep 2011 10:56:00 -0000	[thread overview]
Message-ID: <bug-50471-4-9r2PCcF4t1@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <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.


  parent reply	other threads:[~2011-09-21 10:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-21  5:44 [Bug c++/50471] New: " zoltan at epochcapital dot com.au
2011-09-21  6:19 ` [Bug c++/50471] " zoltan at epochcapital dot com.au
2011-09-21  6:44 ` zoltan at epochcapital dot com.au
2011-09-21  7:14 ` pinskia at gcc dot gnu.org
2011-09-21  7:35 ` zoltan at epochcapital dot com.au
2011-09-21 10:56 ` redi at gcc dot gnu.org [this message]
2011-09-21 11:04 ` redi at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-50471-4-9r2PCcF4t1@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).