The closest specification I could find is here 12.4.10 class.dtor :
... A program is poorly formed if an object of type or array of a class is declared and the destructor for the class is not available at the declaration point.
class B cannot access private: ~A() , but implicitly declares class A because it is a base class (this is almost the same as declaring the first member variable - except for optimizing an empty base).
I am not a language lawyer, not a native speaker , but an invalid base class destructor seems to be a problem, and the above may explain why the error points to the B() constructor (the compiler can perform checks when they are really needed, and not earlier )
The destructor ~A() must be made at least protected or B friend A
firda source share