Registered Member
|
I want to use Eigen with fadbad for automatic differentiation.
When I multiply two vectors
I get the following error message (ninja-build, gcc-7.1):
When I use double as Scalar type it compiles and runs without errors. How can I solve this problem? |
Moderator
|
This is a common issue, I guess that the problem is that fadbad exposes a generic implicit constructor making it as if it can be converted from everything. More precisely, std::is_convertible<X, fadbad> thus returns true for any type X, including an Eigen::Matrix< fadbad >. In m * m, one of the factor can thus be interpreted as a compatible scalar.
This has to be fixed in fadbad, for instance using SFINAE to enable the generic ctor only for valid types. |
Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]