So, I found this quote today, can anyone explain?
"If you think C++ is not overly complicated, just what is a protected abstract virtual base pure virtual private destructor and when was the last time you needed one? — Tom Cargill"
I believe it is a private pure virtual destructor (I think that part is self-explanatory) that is part of an abstract base class, which you've used through protected virtual inheritance. .
class Base
{
private:
virtual ~Base() = 0; /* A */
};
class Derived : protected virtual Base
{
private:
~Derived () {.......} /* B */
};
From the point of view of tag B, the line at tag A is a "protected abstract virtual base pure virtual private destructor",
Each of those three parts has its uses individually. I do not know of a design pattern that requires all three of the above parts, but there's nothing preventing their uses together.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With