[Bug c++/51951] Template function dependent name resolution fails
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jan 23 01:19:00 GMT 2012
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 definition 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 definition
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.
More information about the Gcc-bugs
mailing list