-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use of all-caps macro-style names for enum members collides with macros #644
Comments
Did you have a collision with any specific name? Normally it's easy to fix this by ordering includes but I'm open to changing some names if there are collisions with a widely used C library. |
@vitaut Are these constants for users? If not I'd rather either convert them to enum class if you are targeting C++11 or put them into a detail namespace. |
@t-b They are already in the |
I see collisions as well, up until now I have modified locally the names to have a FMT_ prefix. |
Sorry for not getting back to you earlier. I think in this particular case, it was ruby.h, which is probably not very popular. But independently from that, I would humbly argue that giving C++ enums all caps names, especially one as common as LONG_LONG which is used in many C libs is just asking for trouble. I would suggest moving to a more C++ naming convension (eName or kName), or basically anything else than all caps. |
Fixed in 8ed264f. |
Thanks! |
Hi,
The Type enum defined in format.h uses all uppercase names for its members which easily collides with macro names, especially as those names are commonly used by C libraries:
Great library btw.
Thanks,
O.
The text was updated successfully, but these errors were encountered: