Re: Possible bug: Template name lookup & overloaded functions.

2010-01-19 Thread Jonathan Wakely
2010/1/19 Simon Hill: > Axel Quote: > "Anyways there is an already filed GCC bug about this defect report > against the standard, > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29131 ." > > That bug report is suspended. Is this due to the C++ standards issue > you referred to?: > http://www.open-std

Re: Possible bug: Template name lookup & overloaded functions.

2010-01-18 Thread Simon Hill
Axel Quote: "Anyways there is an already filed GCC bug about this defect report against the standard, http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29131 ." That bug report is suspended. Is this due to the C++ standards issue you referred to?: http://www.open-std.org/JTC1/SC22/WG21/docs/cwg_active.h

Re: Possible bug: Template name lookup & overloaded functions.

2010-01-18 Thread Andrew Pinski
On Mon, Jan 18, 2010 at 4:20 PM, Simon Hill wrote: > I'm pretty sure this is a bug but I'd like a confirmation (or > refutation) before I submit a bug report. > First the issue here is what namespace does the foundental types in C++ have? The standard says none which makes this code invalid but

Re: Possible bug: Template name lookup & overloaded functions.

2010-01-18 Thread Simon Hill
Re Axel: Quote (Axel): "Well, I think g++ behaves correctly. As I understand the standard, the normal function foo(int) can't be used in the template "bar", because it is only declared afterwards." Me: I don't think this can be correct. Removing the template foo() but leaving the normal one also

Re: Possible bug: Template name lookup & overloaded functions.

2010-01-18 Thread Axel Freyn
Hi On Mon, Jan 18, 2010 at 10:37:34PM +1300, Simon Hill wrote: > http://www.gamedev.net/community/forums/topic.asp?topic_id=559287 > > SOURCE > > template > void foo(pTYPE arg) > { arg.nid(); } > > template > void bar() > { > pTYPE var; > foo(var); >

Possible bug: Template name lookup & overloaded functions.

2010-01-18 Thread Simon Hill
http://www.gamedev.net/community/forums/topic.asp?topic_id=559287 SOURCE template void foo(pTYPE arg) { arg.nid(); } template void bar() { pTYPE var; foo(var); } void foo(int) {} int main() { int i; foo(i); // OK: Resolves foo(int