This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen

Bug 1722

Summary: Initialization of Eigen::MatrixXd failes when one of the ColsAtCompileTime==1 and RowMajor on for the argument
Product: Eigen Reporter: Justin Carpentier <justin.carpentier>
Component: Core - generalAssignee: Nobody <eigen.nobody>
Status: RESOLVED DUPLICATE    
Severity: Compilation Problem CC: chtz, gael.guennebaud, jacob.benoit.1
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:

Description Justin Carpentier 2019-06-13 09:09:12 UTC
Dear Eigen's developers,

I encounter a compilation issue when trying to solve the small lines of:

#include <Eigen/Core>

int main(int, char**)
{
  using namespace Eigen;
  const DenseIndex size = 100;
  Matrix<double,Dynamic,1,RowMajor> row_vec(size);
  MatrixXd row_vec_dyn(row_vec);

  return 0;
}

This seems due to the lines:
      EIGEN_STATIC_ASSERT((EIGEN_IMPLIES(MaxRowsAtCompileTime==1 && MaxColsAtCompileTime!=1, (Options&RowMajor)==RowMajor)
                        && EIGEN_IMPLIES(MaxColsAtCompileTime==1 && MaxRowsAtCompileTime!=1, (Options&RowMajor)==0)

in src/Core/PlainObjectBase.h

I can remove those lines and make a new PR to the official repo. What do you think?

Thanks in advance for your help,
Best,

Justin
Comment 1 Christoph Hertzberg 2019-06-13 09:16:27 UTC
That is by design. See duplicate Bug 416 for discussion on the topic.

*** This bug has been marked as a duplicate of bug 416 ***
Comment 2 Nobody 2019-12-04 18:40:37 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/1722.