🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #2015

uninheritable base classes

#2015
From: James Clark
Date: Fri, 19 May 1989 08:50
23 lines
993 bytes
struct A {
  virtual void foo() = 0;
};

struct B : A {
  virtual void bar() = 0;
};

struct C : B {
  void foo();
  void bar();
};

G++ 1.35.0 won't compile this unless I add `virtual void foo() = 0;'
to B.  I don't know whether this is a bug, but it strikes me as a bit
unreasonable. I think that a derived class that itself has explicit
uninheritable virtuals should be able to inherit uninheritable
virtuals from a base class, with the inherited virtuals that are
uninheritable in the base class becoming uninheritable in the derived
class.

James Clark
jjc@jclark.uucp
Technical Details
Message-ID: <8905190850.AA09785@jclark.uucp>
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!UUNET.UU.NET!jclark!jjc

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!UUNET.UU.NET!jclark!jjc
From: jclark!jjc@UUNET.UU.NET (James Clark)
Newsgroups: gnu.g++.bug
Subject: uninheritable base classes
Message-ID: <8905190850.AA09785@jclark.uucp>
Date: 19 May 89 08:50:34 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 23