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
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
--- 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
--- 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
--- 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