Consider the following text:
[C++11: 12.4/11]:
Destructors are invoked implicitly
- for constructed objects with static
Accessibility is orthogonal to deletedness:
[C++11: 11.2/1]:
If a class is declared to be a base class (Clause 10) for another class using thepublic
access specifier, thepublic
members of the base class are accessible aspublic
members of the derived class andprotected
members of the base class are accessible asprotected
members of the derived class. If a class is declared to be a base class for another class using theprotected
access specifier, thepublic
andprotected
members of the base class are accessible asprotected
members of the derived class. If a class is declared to be a base class for another class using theprivate
access specifier, thepublic
andprotected
members of the base class are accessible asprivate
members of the derived class.
There is this:
[C++11: 8.4.3/2]:
A program that refers to a deleted function implicitly or explicitly, other than to declare it, is ill-formed. [ Note: This includes calling the function implicitly or explicitly and forming a pointer or pointer-to-member to the function. It applies even for references in expressions that are not potentially-evaluated. If a function is overloaded, it is referenced only if the function is selected by overload resolution. —end note ]
But you never "refer to" the deleted destructor.
(I still can't explain why the inheritance example doesn't compile.)