In the function QuaternionBase<Derived>::setFromTwoVectors() (file Quaternion.h line 587), I think the scalar -1 in the code c = max<Scalar>(c, -1); should be casted to Scalar like the following c = max<Scalar>(c, Scalar(-1)); as other scalars were done in the code. This would be helpful for some scalar types like ceres::Jet. A compile error will occur if it is not casted.
Fixed in devel and 3.2. https://bitbucket.org/eigen/eigen/commits/bc6cd05 https://bitbucket.org/eigen/eigen/commits/06143e9 Thanks for the report
*** Bug 1163 has been marked as a duplicate of this bug. ***
-- 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/806.