Re: [eigen] overloaded operator new

[ Thread Index | Date Index | More Archives ]

2009/1/5 Benoit Jacob <jacob.benoit.1@xxxxxxxxx>:
> 2009/1/5 Gael Guennebaud <gael.guennebaud@xxxxxxxxx>:
>> On Mon, Jan 5, 2009 at 3:59 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
>>> Hi List *cough* Gael *cough*
>>> Currently, we have:
>>> struct ei_with_aligned_operator_new : WithAlignedOperatorNew {};
>> well, they are both struct (not class), so everything is always public.
> Wait, I thought that a struct was just a class that defaulted to
> public for its own members.
> Are you saying that there is also the difference that for inheritance
> a struct will default to public?

So I made tests on trivial programs with GCC 4.3.2, and it turns out
that when you do

struct B : A


the inheritance is public, regardless of whether A is a struct or a class.

So it doesn't matter in our case that WithAlignedOperatorNew is a
struct; what matters is that ei_with_aligned_operator_new is.

I update the unalignedassert webpage because the users may use classes
not structs...



Mail converted by MHonArc 2.6.19+