Skip to content
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

Rename uint alias to prevent name collision with Qt #3114

Closed
wants to merge 1 commit into from

Conversation

Bruflot
Copy link

@Bruflot Bruflot commented Sep 25, 2022

Qt defines some global typedefs - one of which being uint - which causes a name collision when using Qt alongside fmtlib. Although this isn't fmtlib's fault, I think it's a common enough problem that it warrants a fix.

@vitaut
Copy link
Contributor

vitaut commented Sep 25, 2022

Thanks for the PR but typedefs shouldn't cause collisions with locally defined symbols.

@vitaut vitaut closed this Sep 25, 2022
@Bruflot
Copy link
Author

Bruflot commented Sep 25, 2022

MSVC has a warning for precisely that:

https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-4-c4459?view=msvc-170

It's enabled by default when you compile with /W4. We would disable warnings for fmtlib if we could, but since the warnings stem from a header it's easier said than done.

@vitaut
Copy link
Contributor

vitaut commented Sep 25, 2022

You can suppress a warning with FMT_SYSTEM or other means.

@Bruflot Bruflot deleted the name_collision branch October 5, 2022 19:47
@Pokechu22
Copy link
Contributor

Note: an equivalent PR was merged: #3137

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants