Re: [eigen] patch to allow different aligned allocators with STL containers

[ Thread Index | Date Index | More Archives ]

On Wed, Jul 28, 2010 at 4:52 AM, Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx> wrote:
Thank you for the patch - applied.

I don't see any MSVC errors with VS10. Do you have some code to reproduce this?

- Hauke

The following code fails to compile under VS9 (I don't have VS10 yet).  Switching to std::vector works just fine:

#include <Eigen/Core>
#include <Eigen/StdDeque>

int main()
    typedef Eigen::Matrix<float, 4, 4> Matrix4;

    std::deque< Matrix4, Eigen::aligned_allocator<Matrix4> > matrixDeque;

    return 0;

The compiler output is:

c:\Program Files\Microsoft Visual Studio 9.0\VC\include\deque(715) : error C2719: '_Val': formal parameter with __declspec(align('16')) won't be aligned
        c:\documents and settings\biohazard\my documents\development\redshirt\third_party\eigen\eigen\src/StlSupport/StdDeque.h(98) : see reference to class template instantiation 'std::deque<_Ty,_Ax>' being compiled
        ..\..\..\projects\deque_test\source\main.cpp(8) : see reference to class template instantiation 'std::deque<_Ty,_Ax>' being compiled
Build log was saved at "file://c:\Documents and Settings\biohazard\My Documents\Development\redshirt\build\projects\deque_test\deque_test.dir\Debug\BuildLog.htm"
deque_test - 1 error(s), 0 warning(s)

Mail converted by MHonArc 2.6.19+