[Bug c++/31047] GCC 4.1.1 has template bug
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Mar 6 17:10:00 GMT 2007
------- Comment #4 from pinskia at gcc dot gnu dot org 2007-03-06 17:10 -------
(In reply to comment #3)
> No, this is a bug, 2nd stage name-lookup should find foo(const int&) as var is
> dependent on the template parameter T (14.6/8, /9).
> But I bet we have a dup for this.
14.6.4.2/1 says this is invalid code.
For a function call that depends on a template parameter, if the function is an
unqualified-id but not a template-id, the candiate functions are found using
the usual lookup rules (3.4.1, 3.4.2) except that:
....
Paraphasing since I don't want to type it all in
* non argument dependent lookup (3.4.1: template definition context
* argument dependent lookup (3.4.2): template definition context and template
instation context
Since the type is a fundamental type, argument dependent lookup does not apply,
therefor this is not a bug.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31047
More information about the Gcc-bugs
mailing list