
Since Eigen matrices and vectors use SSE and therefore require a particular alignment, Eigen requires that when these types (specifically, the compile-time sized versions) are within a struct or class, that struct be given the EIGEN_MAKE_ALIGNED_OPERATOR_NEW macro. But here's the problem. What if that struct is allocated by a boost::pool_allocator<T>? Is there any way to enforce alignment then? I'm trying it and it just isn't working. I keep getting breakpoints hit inside of Eigen calls, presumably due to unaligned accesses. Has anyone investigated this, and are there any reasonable options? Perhaps a way to force the pool's start to be aligned, and a way to make sure the sizeof() my type as a whole is aligned? (But what about allocator conversion, eg, std::allocate_shared<T> may take an allocator<T> but it converts it internally to an allocator<somewrapper<T>>?)