From bf71b466e9ade0359c30ab5e672ca09bd9a58a57 Mon Sep 17 00:00:00 2001 From: Hauke Heibel Date: Mon, 26 Apr 2010 16:59:04 +0200 Subject: [PATCH] Removed ambiguity between Map and Matrix Options template parameter. --- Eigen/src/Core/Map.h | 14 ++++++++------ Eigen/src/Core/util/ForwardDeclarations.h | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Eigen/src/Core/Map.h b/Eigen/src/Core/Map.h index eb7262bdb..a22779bf9 100644 --- a/Eigen/src/Core/Map.h +++ b/Eigen/src/Core/Map.h @@ -31,7 +31,7 @@ * \brief A matrix or vector expression mapping an existing array of data. * * \param PlainObjectType the equivalent matrix type of the mapped data - * \param Options specifies whether the pointer is \c Aligned, or \c Unaligned. + * \param MapOptions specifies whether the pointer is \c Aligned, or \c Unaligned. * The default is \c Unaligned. * \param StrideType optionnally specifies strides. By default, Map assumes the memory layout * of an ordinary, contiguous array. This can be overridden by specifying strides. @@ -73,8 +73,8 @@ * * \sa Matrix::Map() */ -template -struct ei_traits > +template +struct ei_traits > : public ei_traits { typedef typename PlainObjectType::Scalar Scalar; @@ -84,7 +84,7 @@ struct ei_traits > HasNoInnerStride = InnerStrideAtCompileTime <= 1, HasNoOuterStride = OuterStrideAtCompileTime == 0, HasNoStride = HasNoInnerStride && HasNoOuterStride, - IsAligned = int(int(Options)&Aligned)==Aligned, + IsAligned = int(int(MapOptions)&Aligned)==Aligned, IsDynamicSize = PlainObjectType::SizeAtCompileTime==Dynamic, KeepsPacketAccess = bool(HasNoInnerStride) && ( bool(IsDynamicSize) @@ -96,10 +96,12 @@ struct ei_traits > Flags2 = HasNoStride ? int(Flags1) : int(Flags1 & ~LinearAccessBit), Flags = KeepsPacketAccess ? int(Flags2) : (int(Flags2) & ~PacketAccessBit) }; +private: + enum { Options }; // Expressions don't support Options }; -template class Map - : public MapBase > +template class Map + : public MapBase > { public: diff --git a/Eigen/src/Core/util/ForwardDeclarations.h b/Eigen/src/Core/util/ForwardDeclarations.h index c884487b6..d660078c7 100644 --- a/Eigen/src/Core/util/ForwardDeclarations.h +++ b/Eigen/src/Core/util/ForwardDeclarations.h @@ -79,7 +79,7 @@ template class Dia template class Diagonal; template class Stride; -template > class Map; +template > class Map; template class TriangularBase; template class TriangularView;