RobotLocomotion / drake

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

Don't (yet) require semicolons on statement-like macros #21634

Closed jwnimmer-tri closed 6 days ago

jwnimmer-tri commented 6 days ago

The lack of semicolons after these macros is deprecated and we plan to re-enforce this requirement in a future release (after 2024-08-01). Macros that will require trailing semicolons at call sites are:

DRAKE_DEFINE_CLASS_TEMPLATE_INSTANTIATIONS_ON_DEFAULT_SCALARS DRAKE_DEFINE_CLASS_TEMPLATE_INSTANTIATIONS_ON_DEFAULT_NONSYMBOLIC_SCALARS DRAKE_DECLARE_CLASS_TEMPLATE_INSTANTIATIONS_ON_DEFAULT_SCALARS DRAKE_DECLARE_CLASS_TEMPLATE_INSTANTIATIONS_ON_DEFAULT_NONSYMBOLIC_SCALARS DRAKE_DEFINE_FUNCTION_TEMPLATE_INSTANTIATIONS_ON_DEFAULT_SCALARS DRAKE_DEFINE_FUNCTION_TEMPLATE_INSTANTIATIONS_ON_DEFAULT_NONSYMBOLIC_SCALARS


Amends #21603. If this merges, I'll go back and change the notes tag on that PR to "none" instead of "breaking".


This change is Reviewable

jwnimmer-tri commented 6 days ago

+@rpoyner-tri for both reviews, please.

WDYT? I decided I can hold another month or two before I want to land a patch that depends on this.

(In the meantime, I might whip up a little Python program that auto-fixes downstream users' code.)

jwnimmer-tri commented 6 days ago

Yeah, I want to at least keep the door open to ripping it out sooner than later. If we decide to wait longer to remove, that's still compatible with this description.