This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/10690: bogus ambiguity on templates overloaded on return type
- From: giovannibajo at libero dot it
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, sebor at roguewave dot com
- Date: 8 May 2003 19:56:08 -0000
- Subject: Re: c++/10690: bogus ambiguity on templates overloaded on return type
- Reply-to: giovannibajo at libero dot it, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, sebor at roguewave dot com, gcc-gnats at gcc dot gnu dot org
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