invalid offsetof from non-POD type

Nathan Sidwell nathan@codesourcery.com
Sat Apr 26 14:42:00 GMT 2003


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.
	
nathan

-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
          The voices in my head said this was stupid too
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org




More information about the Gcc mailing list