This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Example of GCC 2.95 member templates letting me down
- To: redleaf <e1wwater at dingo dot cc dot uq dot edu dot au>
- Subject: Re: Example of GCC 2.95 member templates letting me down
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 20 Jul 1999 08:58:28 -0300
- Cc: egcs at egcs dot cygnus dot com, gcc-patches at egcs dot cygnus dot com
- References: <37940AE4.126CFC05@dingo.uq.edu.au>
On Jul 20, 1999, redleaf <e1wwater@dingo.cc.uq.edu.au> wrote:
> GCC 2.95 does not like a template class member function calling a member
> template of another class...
Actually, the scenario doesn't have to be that elaborate: the
following testcase, that I'm installing in the testsuite, presents the
same problem:
// Build don't link:
// Copyright (C) 1999 Free Software Foundation
// by Alexandre Oliva <oliva@dcc.unicamp.br>
// simplified from bug report by redleaf <e1wwater@dingo.cc.uq.edu.au>
struct B {
template <class> void bar();
} b;
template <class T> void foo() {
b.bar<T>(); // gets bogus error - bar undeclared - XFAIL *-*-*
b.template bar<T>(); // gets bogus error - ditto - XFAIL *-*-*
typedef typeof(b) b_t;
}
template void foo<void>(); // gets bogus error - XFAIL *-*-*
Note the work-around: explicitly qualify the member template.
--
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{dcc.unicamp.br,guarana.{org,com}} aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them