* allow Matrix to be resized to 0 (solve a lot of troubles with

some containers)
* new workaround for std::vector which is supposed to work for any
  classes having EIGEN_MAKE_ALIGNED_OPERATOR_NEW as discussed on ML
This commit is contained in:
Gael Guennebaud
2009-02-07 11:16:15 +00:00
parent 24808dc090
commit 3009d79a1f
7 changed files with 125 additions and 20 deletions

View File

@@ -226,7 +226,6 @@ class Matrix
*/
inline void resize(int rows, int cols)
{
ei_assert(rows > 0 && cols > 0 && "a matrix cannot be resized to 0 size");
ei_assert((MaxRowsAtCompileTime == Dynamic || MaxRowsAtCompileTime >= rows)
&& (RowsAtCompileTime == Dynamic || RowsAtCompileTime == rows)
&& (MaxColsAtCompileTime == Dynamic || MaxColsAtCompileTime >= cols)
@@ -240,7 +239,6 @@ class Matrix
*/
inline void resize(int size)
{
ei_assert(size>0 && "a vector cannot be resized to 0 length");
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Matrix)
if(RowsAtCompileTime == 1)
m_storage.resize(size, 1, size);