Registered Member
|
Hello all,
I'm trying to write some code that needs to multiply two Rotation2D<float> variables and store the result in another Rotation2D<float>. A sample piece of code is
However, compiling this results in the error
Note that if you replace the Rotation2Ds with Quaternions, the code compiles without issue. Is this a bug, or am I doing something incorrect? Thanks, -Avi |
Moderator
|
Works for me with Eigen 3.2.3 and the devel branch. I did not check with older versions.
|
Registered Member
|
That's odd, I just downloaded 3.2.3 and tested it and get the same error. Could it be a g++ version issue? I've tried it with g++ 4.8.2 and 4.6. The command I'm running is
from within the top level of the Eigen directory, and the full contents of test.cpp are
Regards, -Avi |
Moderator
|
Works for me with GCC 4.6, 4.7, 4.8, 4.9 and clang. Make sure that you are really using Eigen 3.2 and not a system-wide installed version with -I path/to/eigen3.2
|
Registered Member
|
I think I may see what's going on. In the 3.2.3 version available for download, the function "operator*" for Rotation2D is defined as follows:
This definition won't work for my example, because the constructor that takes a Scalar as the parameter is defined as "explicit". However, in the current development source that same function is defined as
which does indeed work. Thank you for looking into this! -Avi |
Moderator
|
arf, right. this has been fixed just after the 3.2.3 release, and I only tested with the 3.2 branch, not the exact 3.2.3 release. (changeset 5d9e54445535).
|
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]