Registered Member
|
Hello
I am trying to get the following behaviour with EIGEN: I want a function like:
I want that only Structures with a size 6xN can be supplied to the function. But how can this work with expressions for example:
I dont want a general template for all structures like
Do I have to specialise the same function for Block and VectorBlock as well? So 3 overloads?
What is the ellegant and correct solution? Thanks for your help!! |
Moderator
|
write a generic function for MatrixBase<> or even DenseBase<> objects, an then use a static assertion:
EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Derived,6) This is what we do in Eigen. Another solution is to use the enable_if mechanism of boost. |
Registered Member
|
Thanks alot!
Helped alot! |
Registered users: Bing [Bot], Google [Bot], q.ignora, watchstar