Re: [eigen] Std Vector again

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


2009/6/26 Patrick Mihelich <patrick.mihelich@xxxxxxxxx>:
> Keir,
>
> If you are already using Boost, I suggest sidestepping the Eigen/std::vector
> quandary and instead using the vector implementation in Boost.Interprocess
> for Eigen types. Although it (currently) lives in Interprocess, it's a fully
> generic implementation of STL vector that fixes the resize flaw and has some
> other niceties such as support for move semantics.
>
> Current C++ may not have templated typedefs, but you can get some of the
> same benefits from a simple meta-program:
>
> #include <boost/interprocess/containers/vector.hpp>
>
> template<typename T>
> struct AlignedVector
> {
>   typedef boost::interprocess::vector<T, Eigen::aligned_allocator<T> > type;
> };
>
> AlignedVector<Vector4f>::type my_vec;

I think you need a typename keyword here ;)

Benoit



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