RobotLocomotion / drake

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

[framework] Update scalar conversion test utility #22188

Closed rpoyner-tri closed 6 days ago

rpoyner-tri commented 1 week ago

As of Xcode 16 or so, it is no longer safe to blithely dynamic_cast a system to a type that it has statically forbidden conversion support for. Instead, check (statically) for conversion support, and only then step through the dynamic conversion test steps. Give a nice error message if the conversion is forbidden statically.

While here, revert an obsolete compiler workaround, and fold the implementation code down from two copies to one.


This change is Reviewable

rpoyner-tri commented 1 week ago

@drake-jenkins-bot mac-arm-sequoia-unprovisioned-clang-bazel-experimental-release please.

rpoyner-tri commented 1 week ago
Previously, rpoyner-tri (Rick Poyner (rico)) wrote…
Close. Everything built, and several python tests failed. Good enough to declare this patch to be progress.

@drake-jenkins-bot mac-arm-sequoia-unprovisioned-clang-bazel-experimental-release please.

jwnimmer-tri commented 6 days ago

On second thought, let's do +@sherm1 as a subject-relevant platform reviewer, please (removing -@sammy-tri). Also I'm going to dump tons of PRs on Sam on Monday, so this will help load-balance.