I was experimenting with C++ and found the below code as very strange.
class Foo{ public: virtual void say_virtual_hi(){ std::cout << \"Vi
The say_hi() member function is usually implemented by the compiler as
say_hi()
void say_hi(Foo *this);
Since you don't access any members, your call succeeds (even though you are entering undefined behaviour according to the standard).
Foo doesn't get allocated at all.
Foo