Hey,
I felt it hard to see such an issue in Microsoft Visual C++ 2008
kept unfixed. I reported an issue that the private virtual base
destructor is being accessed by most derived class for Microsoft
Visual C++ 2005 & 2003. And this issue still persist on Microsoft
Visual C++ 2008. It is hard to see this being a developer who uses
Microsoft Compiler.
The problem is detailed at blog entry
http://amalp.blogspot.com/2007/07/microsoft-vc-2005-compiler-bug-1.html
I will also explain the problem out here.
In C++ there is no standard way to make a class non derivable.
Instead we uses a trick. The trick consist of 2 major concepts. One is
the virtual base class constructor and destructor will be called by
the most derived class. Most derived class is the class which is
instantiated. This is how we fix the diamond problem. Then the second
one is a friend class can access private members of whom it is friend.
Mixing up both of these together we can make a class non derivable.
The same access goes to constructor and destructor.