简单的问题:这种层次结构会导致 DP 吗?
//Abstract base class
class A {
//Implement pure virtual methods with a default definition.
//Pure virtual methods are still declared pure virtual.
};
//Abstract derived class
class B : public A {
//Define pure virtual methods with a default definition.
//Pure virtual methods are still declared pure virtual.
};
//Abstract base class
class C {
//Define pure virtual methods with a default definition.
//Pure virtual methods are still declared pure virtual.
};
//Concrete class
class D : public B, public C {
//Implement all methods from D, B, and C
};