Skip to content

readMSH reference binding problem #1877

@jhwang7628

Description

@jhwang7628

Describe the bug

I recently run into compilation problem with this piece of code:

Eigen::Matrix<double, -1, -1, Eigen::RowMajor> V;
Eigen::Matrix<int, -1, -1, Eigen::RowMajor> F;
igl::readMSH(argv[1], V, F);

With error

error: invalid initialization of non-const reference of type 'Eigen::MatrixXd& {aka Eigen::Matrix<double, -1, -1>&}' from an rvalue of type 'Eigen::MatrixXd {aka Eigen::Matrix<double, -1, -1>}'

If I remove the option Eigen::RowMajor, it compiles fine.

Platform

  • Windows
  • macOS
  • Linux

This is a piece of old code and it compiled fine before. I am on GCC 5.4 with the libigl built-in Eigen. Igl is up-to-date with SHA dda197248e855c13bfac3d6e26b80be75e030ea1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions