1 class PureVirtualBase { 2 public: 3 virtual ~PureVirtualBase() = 0; 4 virtual void foo_pure() = 0; foo_virtual()5 virtual void foo_virtual() {} 6 }; 7 8 class DerivedBar : public PureVirtualBase { 9 public: ~DerivedBar()10 virtual ~DerivedBar() {} foo_pure()11 virtual void foo_pure() override {} 12 virtual void foo_virtual() override = 0; 13 }; 14 ~PureVirtualBase()15PureVirtualBase::~PureVirtualBase() {} 16