From cad73d9cdc7120e84f5e3927a2e2dff3879d5b74 Mon Sep 17 00:00:00 2001 From: Jitse Niesen Date: Fri, 12 Nov 2010 12:06:24 +0000 Subject: [PATCH] Correct std::map fix (two commits ago); copy fix to aligned_allocator doc. --- Eigen/src/Core/util/Memory.h | 4 +++- doc/D01_StlContainers.dox | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Eigen/src/Core/util/Memory.h b/Eigen/src/Core/util/Memory.h index 51ec78f1a..e911b3e06 100644 --- a/Eigen/src/Core/util/Memory.h +++ b/Eigen/src/Core/util/Memory.h @@ -509,11 +509,13 @@ inline static Index first_aligned(const Scalar* array, Index size) * Example: * \code * // Matrix4f requires 16 bytes alignment: -* std::map< int, Matrix4f, std::less, aligned_allocator > my_map_mat4; +* std::map< int, Matrix4f, std::less, +* aligned_allocator > > my_map_mat4; * // Vector3f does not require 16 bytes alignment, no need to use Eigen's allocator: * std::map< int, Vector3f > my_map_vec3; * \endcode * +* \sa \ref TopicStlContainers. */ template class aligned_allocator diff --git a/doc/D01_StlContainers.dox b/doc/D01_StlContainers.dox index 92c67c0ba..b5dbf0698 100644 --- a/doc/D01_StlContainers.dox +++ b/doc/D01_StlContainers.dox @@ -27,9 +27,9 @@ std::map you need to use \code std::map, - std::pair > > + Eigen::aligned_allocator > > \endcode -Note that here, the 3rd parameter "std::less" is just the default value, we only had to specify it because we needed to specify the allocator type, that is the 4th parameter. +Note that the third parameter "std::less" is just the default value, but we have to include it because we want to specify the fourth parameter, which is the allocator type. \section vector The case of std::vector