mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-06 03:57:01 +08:00
fix bug #417: Map should be nested by value, not by reference
(transplanted from 8dd3ae282d0a1426e0a7d0d7bb155e85f6cf8bb1 )
This commit is contained in:
parent
f54cc2284e
commit
457e4b2493
@ -102,7 +102,7 @@ struct traits<Map<PlainObjectType, MapOptions, StrideType> >
|
|||||||
|| HasNoOuterStride
|
|| HasNoOuterStride
|
||||||
|| ( OuterStrideAtCompileTime!=Dynamic
|
|| ( OuterStrideAtCompileTime!=Dynamic
|
||||||
&& ((static_cast<int>(sizeof(Scalar))*OuterStrideAtCompileTime)%16)==0 ) ),
|
&& ((static_cast<int>(sizeof(Scalar))*OuterStrideAtCompileTime)%16)==0 ) ),
|
||||||
Flags0 = TraitsBase::Flags,
|
Flags0 = TraitsBase::Flags & (~NestByRefBit),
|
||||||
Flags1 = IsAligned ? (int(Flags0) | AlignedBit) : (int(Flags0) & ~AlignedBit),
|
Flags1 = IsAligned ? (int(Flags0) | AlignedBit) : (int(Flags0) & ~AlignedBit),
|
||||||
Flags2 = (bool(HasNoStride) || bool(PlainObjectType::IsVectorAtCompileTime))
|
Flags2 = (bool(HasNoStride) || bool(PlainObjectType::IsVectorAtCompileTime))
|
||||||
? int(Flags1) : int(Flags1 & ~LinearAccessBit),
|
? int(Flags1) : int(Flags1 & ~LinearAccessBit),
|
||||||
@ -120,7 +120,6 @@ template<typename PlainObjectType, int MapOptions, typename StrideType> class Ma
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
typedef MapBase<Map> Base;
|
typedef MapBase<Map> Base;
|
||||||
|
|
||||||
EIGEN_DENSE_PUBLIC_INTERFACE(Map)
|
EIGEN_DENSE_PUBLIC_INTERFACE(Map)
|
||||||
|
|
||||||
typedef typename Base::PointerType PointerType;
|
typedef typename Base::PointerType PointerType;
|
||||||
@ -181,7 +180,6 @@ template<typename PlainObjectType, int MapOptions, typename StrideType> class Ma
|
|||||||
PlainObjectType::Base::_check_template_params();
|
PlainObjectType::Base::_check_template_params();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Map)
|
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Map)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user