sharkdp / dbg-macro

A dbg(…) macro for C++

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fails with Eigen matrices

roger- opened this issue · comments

When trying to print Eigen::MatrixXd objects I get an assertion. Eigen::VectorXd objects work though.

Any ideas?

@roger- Could you please share a minimal example to reproduce the issue?

Sure:

Eigen::MatrixXd X(2, 2);
X.setIdentity();

dbg(X);

@roger- I am unable to reproduce the issue. It might be specific to your arch/compiler/c++ std/eigen version.
Here is my attempt - https://godbolt.org/z/Gc8Y1WhMr
Could you try reproducing your issue in godbolt and share it here?

Looks like it fails with Eigen 3.4: https://godbolt.org/z/o8vYzGnWo