You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cppcoreguidelines-macro-usage warning checks warns about
a commonly used wrapper around comma. It is used for other
preprocessing stuff (e.g. to call with a single # afterwards),
and there is no chance to convert it to any function.
file.h:1:9: warning: macro 'COMMA' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage]
#define COMMA ,
The text was updated successfully, but these errors were encountered:
In all these cases the contents of the macro are not anything that could be considered a constant.
#define COMMA ,
The replacement text is a token, not a constant.
#define NORETURN [[noreturn]]
The replacement text is three tokens.
etc.
The check will probably need to consider not only the macro definition, but also the contexts in which the macro is expanded. Yeah, this is a giant PITA, but that's what macros are... a PITA.
Extended Description
Hi
cppcoreguidelines-macro-usage warning checks warns about
a commonly used wrapper around comma. It is used for other
preprocessing stuff (e.g. to call with a single # afterwards),
and there is no chance to convert it to any function.
The text was updated successfully, but these errors were encountered: