diff --git a/Eigen/src/Core/util/ForwardDeclarations.h b/Eigen/src/Core/util/ForwardDeclarations.h index a516a7094..1fdc55b0f 100644 --- a/Eigen/src/Core/util/ForwardDeclarations.h +++ b/Eigen/src/Core/util/ForwardDeclarations.h @@ -220,7 +220,7 @@ template class JacobiRotation; template class RotationBase; template class Cross; template class QuaternionBase; -template class Quaternion; +template class Quaternion; template class Rotation2D; template class AngleAxis; template class Translation; diff --git a/Eigen/src/Geometry/Quaternion.h b/Eigen/src/Geometry/Quaternion.h index d9b34a385..ecf839335 100644 --- a/Eigen/src/Geometry/Quaternion.h +++ b/Eigen/src/Geometry/Quaternion.h @@ -215,28 +215,28 @@ public: */ namespace internal { -template -struct traits > +template +struct traits > { - typedef Quaternion<_Scalar> PlainObject; + typedef Quaternion<_Scalar,_Options> PlainObject; typedef _Scalar Scalar; - typedef Matrix<_Scalar,4,1> Coefficients; + typedef Matrix<_Scalar,4,1,_Options> Coefficients; enum{ - PacketAccess = Aligned + PacketAccess = _Options & DontAlign ? Unaligned : Aligned }; }; } -template -class Quaternion : public QuaternionBase >{ - typedef QuaternionBase > Base; +template +class Quaternion : public QuaternionBase >{ + typedef QuaternionBase > Base; public: typedef _Scalar Scalar; - EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Quaternion) + EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Quaternion) using Base::operator*=; - typedef typename internal::traits >::Coefficients Coefficients; + typedef typename internal::traits >::Coefficients Coefficients; typedef typename Base::AngleAxisType AngleAxisType; /** Default constructor leaving the quaternion uninitialized. */ @@ -272,6 +272,14 @@ public: protected: Coefficients m_coeffs; + +#ifndef EIGEN_PARSED_BY_DOXYGEN + EIGEN_STRONG_INLINE static void _check_template_params() + { + EIGEN_STATIC_ASSERT( (_Options & DontAlign) == _Options, + INVALID_MATRIX_TEMPLATE_PARAMETERS) + } +#endif }; /** \ingroup Geometry_Module