[Bug c++/53573] template type dependent name resolution broken
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jun 5 10:54:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53573
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|major |normal
--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-06-05 10:54:36 UTC ---
(In reply to comment #2)
> The function called in the template definition is clearly dependent on the
> template parameter 'T' and therefore itsname should be resolved at the point of
> instantiation where 'g' is clearly defined and in scope (and is not local). The
> error message says: "no declarations were found by argument-dependent lookup at
> the point of instantiation" when 'g' should be found.
Built-in types have no associated namespaces so ADL can not find 'g' via ADL. A
declaration must be visible at the point of definition.
The example in comment 1 is ill-formed.
Paragraph 10 doesn't apply because the call is clearly dependent.
N.B. N3242 is not the C++ standard and neither is "C++ Special Edition" which
is quite old now.
More information about the Gcc-bugs
mailing list