This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/43506] New: name lookup fails in function template
- From: "yao_yin at 163 dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Mar 2010 10:02:36 -0000
- Subject: [Bug c++/43506] New: name lookup fails in function template
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
aa.cpp:
template<class T> void f(int x, T t)
{
f(t);
}
void f(int);
void h()
{
f(1,2);
}
when compiled with g++ aa.cpp -c, it shows:
aa.cpp: In function 'void f(int, T) [with T = int]':
aa.cpp:10: instantiated from here
aa.cpp:3: error: no matching function for call to 'f(int&)'
once the template instantiated from aa.cpp:10 the function void f(int f) should
has already been declared....
--
Summary: name lookup fails in function template
Product: gcc
Version: 4.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: yao_yin at 163 dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43506