mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
make the std::vector fix work also with dynamic size Eigen objects, e.g.
std::vector<VectorXd> update unit test
This commit is contained in:
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user