[eigen] StdVector

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


Hello everyone,

I want to gather opinions on the StdVector solution because I think the 
problem is solved in the wrong way.

I tried to build a program yesterday that links to a C++ library which exports 
symbols containing std::vector. Unfortunately, I couldn't find a clean way to 
do so when also using Eigen's StdVector because this redefines std::vector, 
resulting in a link error (if you properly include StdVector before declaring 
std::vector). Also, Eigen's meddling with the standard library essentially 
makes every program using Eigen's StdVector exhibit undefined behavior (C++ 
std 17.4.3.1)

I propose to either properly specialize all container classes for Eigen 
classes (could be tricky) or to provide a separate set of containers to use 
with Eigen classes in namespace Eigen. The latter could very well turn out to 
be simpler.

I would love to hear what others think about this.

Markus

PS: Also, Eigen's vector interface is not correct in at least one respect: it 
does not provide the constructor 

template<typename InputIterator> vector(InputIterator first, InputIterator 
last, const Allocator& = Allocator())

-- 
PGP key on www.esat.kuleuven.be/~mmoll/public_key.pgp
Fingerprint is 
90C4 B47D 1A00 5AC1 9147  3197 EDA7 1E0E 99E4 9EDB



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