Just out of curiosity I tried to do something like the example below to see if the compiler gives me a warning or so instead of calling an endless loop which ends up in a stack overflow. I thought maybe there is a different behavior than just calling normal functions or methods. But that's not the case. Is there a special explanation for that or is it just handled as normal function calls since I am explicitely calling the base class destructor by using the this
operator?
Example:
class A {
virtual ~A();
};
class B : A {
virtual ~B() { this->~A(); }
};