The default destructor is not private.
In your class A, as you never write public:
, the default visibility is private and so you declare your new destructor as private.
The compiler stops at line 1 of some_function
because it realises it will never be able to destruct this object automatically.