🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by James Clark Fri, 19 May 1989 08:50
uninheritable base classes
#2015
Author: 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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads