RobotLocomotion / drake

Model-based design and verification for robotics.
https://drake.mit.edu
Other
3.29k stars 1.26k forks source link

Improve compatibility of TypeSafeIndex with Eigen 3.4 #15354

Open jwnimmer-tri opened 3 years ago

jwnimmer-tri commented 3 years ago

Related to #14968. Refer to https://github.com/RobotLocomotion/drake/pull/15335#pullrequestreview-702097433 for the motivating discussion.

In #15335, we added some int{} wrappers around uses of TypeSafeIndex to placate the compiler when using Eigen's 3.4 development branch. The purpose of TypeSafeIndex is to easily serve as an index, so it's a bit awkward to need int{} now.

We should dig into the templates or overloads and figure out what's wrong with Drake or Eigen, so that we can remove the int{} noise. Once we have that fix landed, we should revert #15335 and any similar int{} that have been added in the meantime.

jwnimmer-tri commented 1 year ago

I should clarify -- I'm just the messenger here; I don't actually think we need to fix this. See the linked discussions for the rationale in context.