The documentation for Eigen::Diagonal says, regarding the DiagIndex template parameter:
"... You can also use Dynamic so the index can be set at runtime."
The "Dynamic" should be "DynamicIndex".
Thank you for the report.
-- 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/1378.