[eigen] overloaded operator new |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: [eigen] overloaded operator new
- From: "Benoit Jacob" <jacob.benoit.1@xxxxxxxxx>
- Date: Mon, 5 Jan 2009 15:59:17 +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:mime-version:content-type:content-transfer-encoding :content-disposition; bh=3JY343+sCZgXL+IIR+RBle/5QqtQ0JNLVsKIK/4aMAU=; b=LVzh6t6KyQ77jP0+sMifJlhgcJu8+BCVZRPdCmNt2GN+4erDfBhUsE1ztnuxuXx41q ScnmmJQda0OJbp3MgrPtBY3Z4ircb+6/fTWfvpArts0GLaOAfJNxvjBeQ6mL68YSB+Ir 5vskWsvoQFrFAQvM8RzhzkEZr02+mxkpZCwrY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=sKt4v17T/dw2aMsD8pdZWgzzbVwRSN+tCzHq6EXEEuqdWpIMG/ctSdfaBE26kZGUYf o29NHD5VZRLQopO6APMzrgCKM+9aXV2QJzjz976nMTGh7iqONoaBE2c9WoBWabpAvLjJ 4+jrUGpNeLOPwIwNCQpHCX2RH86ZTO5UlzGmM=
Hi List *cough* Gael *cough*
Currently, we have:
struct ei_with_aligned_operator_new : WithAlignedOperatorNew {};
so this is private inheritance. So my understanding is that in
ei_with_aligned_operator_new (and thus in any subclass of it) the
aligned operator new is private.
So HOW can it be called when from a global context I do
X *x = new X;
where X inherits ei_with_aligned_operator_new?
Should we use public inheritance instead, like this?
struct ei_with_aligned_operator_new : public WithAlignedOperatorNew {};
Notice that classes inheriting ei_with_aligned_operator_new already
inherit it publicly.
Also notice that if we make that change we need to do the same in the
new ei_matrix_with_aligned_operator_new defined in Matrix.h.
Cheers,
Benoit
---