This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/31047] GCC 4.1.1 has template bug
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Mar 2007 17:10:29 -0000
- Subject: [Bug c++/31047] GCC 4.1.1 has template bug
- References: <bug-31047-12095@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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