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]

Re: Bug report - Pure non-virtual template declarations


On Nov 10, 1999, Philippe Bouchard <boucp00@DMI.USherb.CA> wrote:

> The compiler does not detect the following error:

The real error is to accept this declaration.  Member function
templates shall not be virtual [temp.mem]/3 (thus they can't be pure
virtual either), and specializations of member function templates do
not override virtual functions from base classes [temp.mem]/4.  I'm
adding the following testcase to the testsuite:

// Build don't link:

// Copyright (C) 1999 Free Software Foundation

// by Alexandre Oliva <oliva@lsd.ic.unicamp.br>
// based on bug report by Philippe Bouchard <boucp00@DMI.USherb.CA>

struct foo {
  template <class>
  void bar() = 0; // ERROR - invalid initializer - XFAIL *-*-*
};

-- 
Alexandre Oliva http://www.ic.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{lsd.ic.unicamp.br,guarana.{org,com}} aoliva@{acm,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

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