Skip to content

Rename uint alias to prevent name collision with Qt - #3114

Closed
Bruflot wants to merge 1 commit into
fmtlib:masterfrom
Bruflot:name_collision
Closed

Bruflot wants to merge 1 commit into
fmtlib:masterfrom
Bruflot:name_collision

Conversation

@Bruflot

@Bruflot Bruflot commented Sep 25, 2022

Copy link
Copy Markdown

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

vitaut commented Sep 25, 2022

Copy link
Copy Markdown
Contributor

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

@vitaut vitaut closed this Sep 25, 2022
@Bruflot

Bruflot commented Sep 25, 2022

Copy link
Copy Markdown
Author

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

vitaut commented Sep 25, 2022

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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