From e4c88c14ec5baa8818bce94b9580611cd884590c Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Sat, 2 Jan 2010 12:54:55 -0500 Subject: [PATCH] clarify docs as requested on the forum --- doc/StlContainers.dox | 2 +- doc/UnalignedArrayAssert.dox | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/StlContainers.dox b/doc/StlContainers.dox index 9edf0f0bc..b275028b5 100644 --- a/doc/StlContainers.dox +++ b/doc/StlContainers.dox @@ -11,7 +11,7 @@ namespace Eigen { \section summary Executive summary -Using STL containers on \ref FixedSizeVectorizable "fixed-size vectorizable Eigen types" requires taking the following two steps: +Using STL containers on \ref FixedSizeVectorizable "fixed-size vectorizable Eigen types", or classes having members of such types, requires taking the following two steps: \li A 16-byte-aligned allocator must be used. Eigen does provide one ready for use: aligned_allocator. \li If you want to use the std::vector container, you need to \#include . diff --git a/doc/UnalignedArrayAssert.dox b/doc/UnalignedArrayAssert.dox index 19418f5d5..ed5431572 100644 --- a/doc/UnalignedArrayAssert.dox +++ b/doc/UnalignedArrayAssert.dox @@ -55,16 +55,17 @@ Note that here, Eigen::Vector2d is only used as an example, more generally the i \section c2 Cause 2: STL Containers -If you use STL Containers such as std::vector, std::map, ..., with Eigen objects, like this, +If you use STL Containers such as std::vector, std::map, ..., with Eigen objects, or with classes containing Eigen objects, like this, \code std::vector my_vector; -std::map my_map; +struct my_class { ... Eigen::Matrix2f m; ... }; +std::map my_map; \endcode then you need to read this separate page: \ref StlContainers "Using STL Containers with Eigen". -Note that here, Eigen::Matrix2f is only used as an example, more generally the issue arises for all \ref FixedSizeVectorizable "fixed-size vectorizable Eigen types". +Note that here, Eigen::Matrix2f is only used as an example, more generally the issue arises for all \ref FixedSizeVectorizable "fixed-size vectorizable Eigen types" and \ref StructHavingEigenMembers "structures having such Eigen objects as member". \section c3 Cause 3: Passing Eigen objects by value