diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2009-01-10 13:10:23 +0000 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2009-01-10 13:10:23 +0000 |
commit | 0c1ef2f4c67430e3c6605adfb1ddc3ac1d1e779f (patch) | |
tree | 15aad48552efe309e4d18c440cff5b1ac63b68d5 /Eigen/StdVector | |
parent | 3efe6e4176dd76fc3a4e6981ec44ef9741c361d9 (diff) |
make the std::vector fix work also with dynamic size Eigen objects, e.g.
std::vector<VectorXd>
update unit test
Diffstat (limited to 'Eigen/StdVector')
-rw-r--r-- | Eigen/StdVector | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Eigen/StdVector b/Eigen/StdVector index 6d5366468..19be257db 100644 --- a/Eigen/StdVector +++ b/Eigen/StdVector @@ -29,7 +29,7 @@ #include "Core" #include <vector> -namespace Eigen{ +namespace Eigen { template<typename aligned_type> class ei_unaligned_type; template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols> @@ -38,9 +38,10 @@ class ei_unaligned_type<Matrix<_Scalar,_Rows,_Cols,_Options,_MaxRows,_MaxCols> > { public: typedef Matrix<_Scalar,_Rows,_Cols,_Options,_MaxRows,_MaxCols> aligned_base; - ei_unaligned_type() : aligned_base(ei_select_matrix_constructor_doing_absolutely_nothing()) {} + ei_unaligned_type() : aligned_base(ei_constructor_without_unaligned_array_assert()) {} ei_unaligned_type(const aligned_base& other) { + resize(other.rows(), other.cols()); ei_assign_impl<ei_unaligned_type,aligned_base,NoVectorization>::run(*this, other); } }; |