[Bug c++/43506] New: name lookup fails in function template

2010-03-24 Thread yao_yin at 163 dot com
ormal 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

[Bug c++/43507] New: name lookup fails in function template

2010-03-24 Thread yao_yin at 163 dot com
ormal 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=43507

[Bug c++/43506] name lookup fails in function template

2010-03-24 Thread yao_yin at 163 dot com
--- Comment #3 from yao_yin at 163 dot com 2010-03-24 10:56 --- (In reply to comment #1) > That's not how it works. but code followed works , class X; template void f(int x, T t) { f(t); } void f(X *k); void h() { X *a; f(1,a); } -- http://gcc

[Bug c++/43506] name lookup fails in function template

2010-03-24 Thread yao_yin at 163 dot com
--- Comment #6 from yao_yin at 163 dot com 2010-03-25 02:11 --- (In reply to comment #5) > Close as a dup of bug 29131. > Comment #3 is valid as the associated namespace for X is the global > namespace. > But with fundamental types there is currently no associated name

[Bug c++/43506] name lookup fails in function template

2010-03-28 Thread yao_yin at 163 dot com
--- Comment #7 from yao_yin at 163 dot com 2010-03-29 01:56 --- Sorry, I gave a wrong example.. In fact, the code in PR 29131: template int t(T i) { return f (i); // OK, with g++ 4.4.3 } int f (int i) { return i; } int main() { return t(1); } can be compiled with g++ 4.4.3