diff --git a/Eigen/src/Core/Array.h b/Eigen/src/Core/Array.h index 68bd6c32c..598d18910 100644 --- a/Eigen/src/Core/Array.h +++ b/Eigen/src/Core/Array.h @@ -147,7 +147,7 @@ class Array { Base::_check_template_params(); EIGEN_STATIC_ASSERT_VECTOR_ONLY(Array) - eigen_assert(dim > 0); + eigen_assert(dim >= 0); eigen_assert(SizeAtCompileTime == Dynamic || SizeAtCompileTime == dim); EIGEN_INITIALIZE_BY_ZERO_IF_THAT_OPTION_IS_ENABLED } diff --git a/Eigen/src/Core/Matrix.h b/Eigen/src/Core/Matrix.h index f41d554ec..d304fad60 100644 --- a/Eigen/src/Core/Matrix.h +++ b/Eigen/src/Core/Matrix.h @@ -235,7 +235,7 @@ class Matrix { Base::_check_template_params(); EIGEN_STATIC_ASSERT_VECTOR_ONLY(Matrix) - eigen_assert(dim > 0); + eigen_assert(dim >= 0); eigen_assert(SizeAtCompileTime == Dynamic || SizeAtCompileTime == dim); EIGEN_INITIALIZE_BY_ZERO_IF_THAT_OPTION_IS_ENABLED } diff --git a/doc/A05_PortingFrom2To3.dox b/doc/A05_PortingFrom2To3.dox index 6f76d520f..37ab956c3 100644 --- a/doc/A05_PortingFrom2To3.dox +++ b/doc/A05_PortingFrom2To3.dox @@ -22,7 +22,11 @@ and gives tips to help porting your application from Eigen2 to Eigen3. \section CompatibilitySupport Eigen2 compatibility support -In order to ease the switch from Eigen2 to Eigen3, Eigen3 features a compatibility mode which can be enabled by defining the EIGEN2_SUPPORT preprocessor token \b before including any Eigen header (typically it should be set in your project options). +In order to ease the switch from Eigen2 to Eigen3, Eigen3 features a Eigen2 support modes \ref TopicResizing "this page".. + +The quick way to enable this is to define the EIGEN2_SUPPORT preprocessor token \b before including any Eigen header (typically it should be set in your project options). + +Moreover, we also provided a staged migration path which may be useful to migrate large projects \section Using The USING_PART_OF_NAMESPACE_EIGEN macro diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 4a4f80155..dccddd57d 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -121,6 +121,7 @@ ei_add_test(permutationmatrices) ei_add_test(eigen2support) ei_add_test(nullary) ei_add_test(nesting_ops "${CMAKE_CXX_FLAGS_DEBUG}") +ei_add_test(zerosized) ei_add_test(prec_inverse_4x4)