Created attachment 956 [details]
Minimal failing example
In the test.cpp file in the attachment, I have followed your explanation here about how to add support for Adolc's adtl::adouble type: http://eigen.tuxfamily.org/dox/TopicCustomizing_CustomScalar.html . The code compiles under the version of Eigen that comes with Ubuntu 16.04 (dpkg calls this version 3.3~beta1-2), but when I compile it under Eigen 3.3.7, the fact that I have multiplied a double with an Eigen::Matrix<adtl::adouble,2,1> causes compiler errors. I first noticed this issue in Eigen 3.3.4 (the version that comes with Ubuntu 18.04). But if you replace adtl::adouble with std::complex<double>, it compiles in all three versions of Eigen. The attachment contains the GCC errors that occur under Eigen 3.3.4 and 3.3.7.
Adolc provides the following overload of the * operator:
adouble operator * (const double v, const adouble& a)
Do I need to specialise some additional class templates to allow Eigen to determine the return type?
P.S.: I know I can work around the issue by constructing an adtl::adouble from the double.
P.P.S.: I'm using AdolC 2.4.1, but I don't think this is relevant to the issue.
-- 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/1760.