This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++/10690: bogus ambiguity on templates overloaded on return type


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]