Re: [eigen] StdVector again

[ Thread Index | Date Index | More Archives ]

2009/8/30 Benoit Jacob <jacob.benoit.1@xxxxxxxxx>:
> 2009/8/28 Markus Moll <markus.moll@xxxxxxxxxxxxxxxx>:
>> Hi
>> On Thursday 27 August 2009 13:45:40 Markus Moll wrote:
>>> the problems reported in the two recent mails on StdVector sounded
>>> suspiciously familiar to me.
>>> Indeed, both are due to a problem solved quite a while ago, but
>>> unfortunately the changes are in the default branch, while the current
>>> branch seems to be 2.0, which does not contain them.
>> Ah, sorry. If my understanding is correct, the 2.0 branch is the stable
>> branch, while default is development (right?)
> Right.
>> Daniel, you essentially ran into two problems. StdVector in 2.0 redefines
>> std::vector so that it can be used with aligned Eigen types. What happened is:
>> 1. The redefinition of std::vector makes programs compiled with Eigen
>> incompatible with libraries that export anything containing std::vector (the
>> std::vector type for compiling the library is different from the one used for
>> compiling your program).
> That's true, this problem exists with Eigen 2.0. Just to make it
> clear: it is only with Eigen 2.0, not with the development branch.
>> It _might_ work if you carefully include the library
>> headers (boost in your case) _before_ including StdVector. Of course, then you
>> cannot use any Eigen vectors before that point, either. However, this might be
>> arbitrarily complex if not impossible in larger projects.
>> 2. The vector interface in the stable branch is not complete and does not
>> satisfy the requirements imposed by the standard. This is why your constructor
>> call did not succeed.
>> To the developers: Would it be possible to include the fixes in the 2.0 branch
>> as well?
> We can add any missing constructors or assignment operators in the 2.0
> branch if that helps. But that would only address issue 2 above.
>> Granted, it would change the interface
> Indeed, if we wanted to fix issue 1 above, we'd have to break
> compatibility. That's not doable at this point: people expect Eigen
> 2.0.6 to be fully compatible with Eigen 2.0.5.
> What I can propose to you is instead to add the development branch's
> StdVector as NewStdVector in the 2.0 branch. In this way, people who
> want StdVector as in the devel branch would just include NewStdVector
> instead of StdVector. So people have choice and compatibility isn't
> disrupted.
> Daniel, Markus, would you like this?
> Benoit

That would be definitely worth trying. Though I need to sit down on
monday and reassess my situation properly. I apologise for bringing
this up not so well informed - got thrown into this project where a
colleague of mine was using Eigen all over the place and been been
buried since. Usually I follow this mailing list pretty closely, but
missed all the debate on stdvector (just caught up on it today).
So...I need to sit down and work out why and where he's needing to use
the StdVector. Under what conditions exactly is it essential? Perhaps
more importantly, we need to readdress the way he's using it.

Will keep you updated.

Daniel Stonier.

Mail converted by MHonArc 2.6.19+