diff options
author | 2013-06-28 15:56:43 +0200 | |
---|---|---|
committer | 2013-06-28 15:56:43 +0200 | |
commit | 4cf742525f47129878fe561f56be9bd6ec83feb1 (patch) | |
tree | 21ac5ba0b56450e3b7b57f955f200f4f500dcbff /Eigen/src/SparseCore/SparseMatrix.h | |
parent | 487d94f495628f557a1a7456cc2793c1fe043108 (diff) |
bug #626: add compiletime check of the Options template parameter of SparseMatrix and SparseVector. Fix eval and plain_object for sparse objects.
Diffstat (limited to 'Eigen/src/SparseCore/SparseMatrix.h')
-rw-r--r-- | Eigen/src/SparseCore/SparseMatrix.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Eigen/src/SparseCore/SparseMatrix.h b/Eigen/src/SparseCore/SparseMatrix.h index 072578132..fc6933a60 100644 --- a/Eigen/src/SparseCore/SparseMatrix.h +++ b/Eigen/src/SparseCore/SparseMatrix.h @@ -31,7 +31,7 @@ namespace Eigen { * * \tparam _Scalar the scalar type, i.e. the type of the coefficients * \tparam _Options Union of bit flags controlling the storage scheme. Currently the only possibility - * is RowMajor. The default is 0 which means column-major. + * is ColMajor or RowMajor. The default is 0 which means column-major. * \tparam _Index the type of the indices. It has to be a \b signed type (e.g., short, int, std::ptrdiff_t). Default is \c int. * * This class can be extended with the help of the plugin mechanism described on the page @@ -833,6 +833,7 @@ private: static void check_template_parameters() { EIGEN_STATIC_ASSERT(NumTraits<Index>::IsSigned,THE_INDEX_TYPE_MUST_BE_A_SIGNED_TYPE); + EIGEN_STATIC_ASSERT((Options&(ColMajor|RowMajor))==Options,INVALID_MATRIX_TEMPLATE_PARAMETERS); } struct default_prunning_func { |