Using STL containers on fixed-size vectorizable Eigen types, or classes having members of such types, requires taking the following two steps:
A 16-byte-aligned allocator must be used. Eigen does provide one ready for use: aligned_allocator.
If you want to use the std::vector container, you need to #include <Eigen/StdVector>.
These issues arise only with fixed-size vectorizable Eigen types and structures having such Eigen objects as member. For other Eigen types, such as Vector3f or MatrixXd, no special care is needed when using STL containers.
https://eigen.tuxfamily.org/dox/group__DenseMatrixManipulation__Alignement.html