Alignment error C2719 with AutoDiffScalar on MSVC 14
Submitted by alejandro castro
Assigned to Nobody
Link to original bugzilla bug (#1279)
Version: 3.2
Operating system: Windows
Description
I wrote in the forum here: https://forum.kde.org/viewtopic.php?f=74&t=135413
But I am think this might be bug. This happens when using AutoDiffScalar (unsupported) and compiling with MSVC14. With other platforms this error does not happen.
I wrote a very simple test code that triggers this compilation error. You can see the version that fails here:
https://github.com/RobotLocomotion/drake/blob/5e78e6b07fa86a1ce3b873572abab42cadf3285b/drake/systems/framework/primitives/test/autodiff_alignment_test.cc
and the results of our CI here:
https://drake-jenkins.csail.mit.edu/job/experimental/3657/
I "fix" the problem by using an unaligned vector of derivatives for the AutoDiffScalar. See commit showing the very simple diff here:
https://github.com/RobotLocomotion/drake/pull/3145/commits/359bafca05597329645e1aa953fb1c0e86af792e
Thank you in advance!