Re: [eigen] sparse matrix wrapper flavour

[ Thread Index | Date Index | More Archives ]

> Given the choice, I tend to prefer storing a member object
> rather than 
> inheriting.

I have to agree the wrapper seems like it would HASA matrix as opposed to ISA matrix.

> So, I vote for (2). The only thing is, make sure that the
> wrapper class 
> doesn't have a member (method or data) with the same
> name as a member of the 
> wrapped class. So that if the user forgets to use
> "->" instead of "." he will 
> get a compiler error. Otherwise the bug could be very hard
> to spot!

I think you can enforce that a wrapper is only a value type by making it's new/delete operator private. Then the user would have to be very persistent to break this functionality.


Mail converted by MHonArc 2.6.19+