diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index e83b92476..48e29ebdc 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -116,9 +116,12 @@ class PlainObjectBase : public internal::dense_xpr_base::type typedef Eigen::Map MapType; friend class Eigen::Map; typedef const Eigen::Map ConstMapType; +#if EIGEN_MAX_ALIGN_BYTES>0 + // for EIGEN_MAX_ALIGN_BYTES==0, AlignedMax==Unaligned, and many compilers generate warnings for friend-ing a class twice. friend class Eigen::Map; - typedef Eigen::Map AlignedMapType; friend class Eigen::Map; +#endif + typedef Eigen::Map AlignedMapType; typedef const Eigen::Map ConstAlignedMapType; template struct StridedMapType { typedef Eigen::Map type; }; template struct StridedConstMapType { typedef Eigen::Map type; }; diff --git a/test/eigensolver_complex.cpp b/test/eigensolver_complex.cpp index b0152203c..0d4e2dc87 100644 --- a/test/eigensolver_complex.cpp +++ b/test/eigensolver_complex.cpp @@ -15,7 +15,6 @@ template bool find_pivot(typename MatrixType::Scalar tol, MatrixType &diffs, Index col=0) { - typedef typename MatrixType::Scalar Scalar; bool match = diffs.diagonal().sum() <= tol; if(match || col==diffs.cols()) {