Re: [eigen] StdVector

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


> or do you want to 'enforce' via documentation? I would vote for enforcing it
> programtically...

via miss alignment assert in debug mode and segfaults in release mode ;)

I see, there are plenty of ways of dealing with it.. :) I would still prefer a compile time error - whenever possible. You already have this nice compile time assert mechanism - so why not use it?

note that we are not only talking about Eigen's types, but also about
any user classes having a fixed size matrix member. Otherwise this
would be very easy to only specialize std:vector for Eigen's type
(this was the previous solution), but that does not scale well to user
types.
 
Well, that's a bummer. I just seem to have overseen this little fact. Still - assuming we would specialize std::allocator as in the attached example we could at least take care that the user is informed that he is doing something wrong when using plain Eigen types. It is clear that this is not a full fleshed solution but it is a beginning and already covering many cases.

Cheers,
Hauke

Attachment: stdvector_part.h
Description: Binary data



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