Re: [eigen] overloaded operator new |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] overloaded operator new
- From: "Benoit Jacob" <jacob.benoit.1@xxxxxxxxx>
- Date: Mon, 5 Jan 2009 19:15:54 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=/vRZzBdfya7RCC+ZTXv7JNUBfew0BGrQbIyesl1MiuY=; b=mVoTFI5/Genl2GVrQmGoUq+AWQtY80/0yrjY41K7hKE0DaVhVSaiuX82xDmex7xzqH 9MfLbvx7lhW3Xkhe+M3eTbYxidYcVaAUrdg/5iy5hBmmnHpsCUeGMt+yWpc3j9orL/g5 eHyklZhjBVMqPEpr/r+Wxl9lhJYg+IQPrBCgk=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=e4xgLcqOAZgoo2v+4cLm80+j+Za1324h9nCtJB6RdgdzoYStFj+VrrPNmcpE+Rgdcp J6weHj1obqHhs8JlOTofC8yAHBe1qDURmh5rLSj2C/d4X/6ZpwmwJPaARaDpbz3viulu HrjtSjyqMbYj9Da8+vgjn529HuHrMPn6Jwrd4=
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...
Cheers,
Benoit
---