Hacker News new | ask | show | jobs
by pandaman 3402 days ago
To be honest, a derived class already cannot be a POD. But stuffing the vtable pointer into any derived class is indeed wasteful for embedded programming and opens another way to exploit your system (if you care about security) by leaving code pointers at the fixed addresses in r/w memory.
1 comments

it can still be standard layout (the 'new' POD for all intents and purposes) if either the base or the derived class is empty.

/pedantic