From 1b004d579469e83d0af607e9083c680c55025694 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Thu, 27 Sep 2012 09:22:10 +0200 Subject: [PATCH] fix SparseMatrix option bit flag in eval<> helper --- Eigen/src/SparseCore/SparseUtil.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Eigen/src/SparseCore/SparseUtil.h b/Eigen/src/SparseCore/SparseUtil.h index 6062a086f..a686e08da 100644 --- a/Eigen/src/SparseCore/SparseUtil.h +++ b/Eigen/src/SparseCore/SparseUtil.h @@ -113,9 +113,10 @@ template struct sparse_eval { template struct sparse_eval { typedef typename traits::Scalar _Scalar; - enum { _Flags = traits::Flags }; + typedef typename traits::Index _Index; + enum { _Options = ((traits::Flags&RowMajorBit)==RowMajorBit) ? RowMajor : ColMajor }; public: - typedef SparseMatrix<_Scalar, _Flags> type; + typedef SparseMatrix<_Scalar, _Options, _Index> type; }; template struct sparse_eval {