[eigen] overloaded operator new

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


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

---


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/