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++/8702: [3.3 regression] matching of conversion operators


Old Synopsis: gcc 3.3: "error: template definition of non-template"
New Synopsis: [3.3 regression] matching of conversion operators

State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Mon Nov 25 09:15:52 2002
State-Changed-Why:
    True. It's a regression on mainline. Here's a reduced
    testcase:
    ------------------------------------
    template <typename X> struct C1{};
    
    template <typename X>
    struct C2 {
        template<typename Y> operator C1<Y>();
        template<typename Y> operator C2<Y>();
    };
    
    
    template<typename X> template<typename Y>
    C2<X>::operator C1<Y>()
    {
      return C1<Y>();
    }
    ---------------------------------
    
    gcc3.3 complains when seeing the definition of the 
    conversion operator.It is apparently confused by the
    second conversion operator, since if I remove that 
    declaration, everything is fine. 3.2.1 and 2.95 accept 
    the code as is.
    
    More on conversion operators and templates:
      PRs 383, 8572, 8578

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8702


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