New user self-registration is disabled due to spam. Please email eigen-core-team @ if you need an account.
Before reporting a bug, please make sure that your Eigen version is up-to-date!
Bug 1722 - Initialization of Eigen::MatrixXd failes when one of the ColsAtCompileTime==1 and RowMajor on for the argument
Summary: Initialization of Eigen::MatrixXd failes when one of the ColsAtCompileTime==1...
Status: RESOLVED DUPLICATE of bug 416
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - general (show other bugs)
Version: unspecified
Hardware: All All
: Normal Compilation Problem
Assignee: Nobody
Depends on:
Reported: 2019-06-13 09:09 UTC by Justin Carpentier
Modified: 2019-06-13 09:16 UTC (History)
3 users (show)


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,

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 ***

Note You need to log in before you can comment on or make changes to this bug.