diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2009-01-04 21:20:42 +0000 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2009-01-04 21:20:42 +0000 |
commit | 06fd84cdb196c8002631580c0642641926fd7a9d (patch) | |
tree | 91975309a760cdc0d272c0bbb6140c30909c1810 | |
parent | 0e5c6405632e03f80b3e2ff0e6f7c8371c98b023 (diff) |
Fix bug in Matrix, in determining whether to overload operator new with an aligned one, introduced in r905543
-rw-r--r-- | Eigen/src/Core/Matrix.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Eigen/src/Core/Matrix.h b/Eigen/src/Core/Matrix.h index 22d8bd8a7..698c8fc5c 100644 --- a/Eigen/src/Core/Matrix.h +++ b/Eigen/src/Core/Matrix.h @@ -117,17 +117,17 @@ struct ei_traits<Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> > }; }; -template<int Options, - bool NeedsToAlign = (Options&Matrix_AutoAlign)> +template<typename T, int Rows, int Cols, int Options, + bool NeedsToAlign = (Options&Matrix_AutoAlign == Matrix_AutoAlign) && Rows!=Dynamic && Cols!=Dynamic && ((sizeof(T)*Rows*Cols)%16==0)> struct ei_matrix_with_aligned_operator_new : WithAlignedOperatorNew {}; -template<int Options> -struct ei_matrix_with_aligned_operator_new<Options, false> {}; +template<typename T, int Rows, int Cols, int Options> +struct ei_matrix_with_aligned_operator_new<T, Rows, Cols, Options, false> {}; template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols> class Matrix : public MatrixBase<Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> > - , public ei_matrix_with_aligned_operator_new<_Options> + , public ei_matrix_with_aligned_operator_new<_Scalar, _Rows, _Cols, _Options> { public: EIGEN_GENERIC_PUBLIC_INTERFACE(Matrix) |