diff --git a/Eigen/src/Core/DenseBase.h b/Eigen/src/Core/DenseBase.h index 53b427b17..8b994f35c 100644 --- a/Eigen/src/Core/DenseBase.h +++ b/Eigen/src/Core/DenseBase.h @@ -157,6 +157,11 @@ template class DenseBase * we are dealing with a column-vector (if there is only one column) or with * a row-vector (if there is only one row). */ + NumDimensions = int(MaxSizeAtCompileTime) == 1 ? 0 : bool(IsVectorAtCompileTime) ? 1 : 2, + /**< This value is equal to Tensor::NumDimensions, i.e. 0 for scalars, 1 for vectors, + * and 2 for matrices. + */ + Flags = internal::traits::Flags, /**< This stores expression \ref flags flags which may or may not be inherited by new expressions * constructed from this one. See the \ref flags "list of flags". diff --git a/test/indexed_view.cpp b/test/indexed_view.cpp index 2d46ffd6b..551dc55b0 100644 --- a/test/indexed_view.cpp +++ b/test/indexed_view.cpp @@ -397,10 +397,6 @@ void test_indexed_view() // } // static checks of some internals: - - #define STATIC_CHECK( COND ) \ - EIGEN_STATIC_ASSERT( (COND) , EIGEN_INTERNAL_ERROR_PLEASE_FILE_A_BUG_REPORT ) - STATIC_CHECK(( internal::is_valid_index_type::value )); STATIC_CHECK(( internal::is_valid_index_type::value )); STATIC_CHECK(( internal::is_valid_index_type::value )); diff --git a/test/main.h b/test/main.h index a94e1ab41..9c8148de2 100644 --- a/test/main.h +++ b/test/main.h @@ -339,6 +339,8 @@ inline void verify_impl(bool condition, const char *testname, const char *file, #define VERIFY_IS_UNITARY(a) VERIFY(test_isUnitary(a)) +#define STATIC_CHECK(COND) EIGEN_STATIC_ASSERT( (COND) , EIGEN_INTERNAL_ERROR_PLEASE_FILE_A_BUG_REPORT ) + #define CALL_SUBTEST(FUNC) do { \ g_test_stack.push_back(EI_PP_MAKE_STRING(FUNC)); \ FUNC; \ diff --git a/test/mapped_matrix.cpp b/test/mapped_matrix.cpp index 6a84c5897..b9f36d8d6 100644 --- a/test/mapped_matrix.cpp +++ b/test/mapped_matrix.cpp @@ -181,6 +181,49 @@ void map_not_aligned_on_scalar() internal::aligned_delete(array1, (size+1)*(size+1)+1); } +#if EIGEN_HAS_CXX11 +template