On Sat, 26 Apr 2003 11:44:59 +0100 Nathan Sidwell
<nathan at codesourcery dot com> wrote:
Matthias Benkmann wrote:
Can't you wrap the POD-stuff in a real POD like this:
yes, but then you (well I've had to in the past), do something like
class Foo {
public:
struct Pod { ...};
...
};
class BiggerFoo : public Foo {
public
struct Pod : Foo::Pod { ... }; // this is a lie now
...
};
It gets annoying to have to write
struct Pod { struct Foo::Pod base; ... };
as that exposes the hierachy to all BiggerFoo::Pod users.
Doesn't inheritance always yield a non-POD? So this wouldn't even work
with offsetof, would it?