-
Notifications
You must be signed in to change notification settings - Fork 197
Replace macro usage for constants #2655
Copy link
Copy link
Closed
Labels
Description
Bears some relation to #2111, in that it might be nice to address old code structure as part of a general cleanup potentially in #2585.
Preprocessor macros are regularly used to define default values for parameters, often in cases where this value may be controllable at the command-line and it is desired for the default value to be printed as part of the help string for that option. However these are not properly context-bound, and in some instances I think I've found duplicate macros purporting to serve the same purpose but used in different places.
These days I try to use eg. a constexpr in the relevant namespace; eg. 7ae2f62. But it could be worthwhile to do an audit and clean up all residual lazy macro usage.
Reactions are currently unavailable