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++/9411: [3.4 regression] [New parser] Template function lookup problem


Old Synopsis: Template function lookup problem (new parser)
New Synopsis: [3.4 regression] [New parser] Template function lookup problem

Responsible-Changed-From-To: unassigned->mmitchel
Responsible-Changed-By: bangerth
Responsible-Changed-When: Thu Jan 23 00:32:27 2003
Responsible-Changed-Why:
    He's the new parser man.
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Thu Jan 23 00:32:27 2003
State-Changed-Why:
    Confirmed. Here's a slightly simpler snippet:
    -----------------------
    struct X {
        template <class B> void foo(B);
    };
    
    template <class D>
    void bar() {
      X().foo<D>(1);
    }
    
    template void bar<int> ();
    --------------------------------
    We now get
    g/a> /home/bangerth/bin/gcc-3.4-pre/bin/gcc -c x.cc
    x.cc: In function `void bar() [with D = int]':
    x.cc:10:   instantiated from here
    x.cc:7: error: no matching function for call to `X::foo(int)'
    g/a> /home/bangerth/bin/gcc-3.3-pre/bin/gcc -c x.cc
    
    It works on the 3.3 branch. This should really work, I'd
    guess. Note that using "X().template foo<D>" also does no
    good.
    
    W.

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


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