This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51951] Template function dependent name resolution fails
- 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: Sun, 22 Jan 2012 23:48:56 +0000
- Subject: [Bug c++/51951] Template function dependent name resolution fails
- Auto-submitted: auto-generated
- References: <bug-51951-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51951
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-01-22 23:48:56 UTC ---
14.6.4 Dependent name resolution [temp.dep.res]
-1- In resolving dependent names, names from the following sources are
considered:
â Declarations that are visible at the point of deïnition of the template.
â Declarations from namespaces associated with the types of the function
arguments both from the instantiation context (14.6.4.1) and from the deïnition
context.
readFromStream is a dependent name, no declaration is visible at the point of
definition of readSingle, bool has no associated namespaces so no declarations
from associated namespaces are considered, so the name is not found. The code
is invalid.