c++/10690: bogus ambiguity on templates overloaded on return type
giovannibajo@libero.it
giovannibajo@libero.it
Thu May 8 20:16:00 GMT 2003
Synopsis: bogus ambiguity on templates overloaded on return type
State-Changed-From-To: open->analyzed
State-Changed-By: bajo
State-Changed-When: Thu May 8 19:56:08 2003
State-Changed-Why:
Using __PRETTY_FUNCTION__, the code compiles correctly on
both 3.3 and 3.4 (CVS 20030503). Thus, the bug is more like this:
---------------------------------------
#include <typeinfo>
template <int VAL>
void func(void) {}
void foo(void)
{
typeid(func<10>);
}
---------------------------------------
pr10690.cpp: In function `void foo()':
pr10690.cpp:8: error: insufficient contextual information to determine type
I believe the code should compile (see also DR115, even if
it does not take into account typeid() but only situations
where the overload set must decay to function pointer). It
works with the EDG frontend but not with MSVC7.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10690
More information about the Gcc-bugs
mailing list