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

Avoid using uint as a type name #3137

Merged
merged 1 commit into from
Oct 12, 2022
Merged

Avoid using uint as a type name #3137

merged 1 commit into from
Oct 12, 2022

Conversation

Youw
Copy link
Contributor

@Youw Youw commented Oct 12, 2022

Sometime uint is defined as a global type by the project's code directly or by some 3rdparty libraries (e.g. Qt or OpenCV). Some versions of MSVC (e.g. v16.11.15) gives a type shadowing warning:

3rdparty\fmtlib\fmt\include\fmt/format.h(3251): warning C4459: declaration of 'uint' hides global declaration
opencv2/core/hal/interface.h(45): note: see declaration of 'uint'

This also causes a compilation failure when /WX is used.

Sometime `uint` is defined as a global type by the project's code directly or by some 3rdparty libraries (e.g. Qt or OpenCV).
Some versions of MSVC (e.g. v16.11.15) gives a type shadowing warning:
```
3rdparty\fmtlib\fmt\include\fmt/format.h(3251): warning C4459: declaration of 'uint' hides global declaration
opencv2/core/hal/interface.h(45): note: see declaration of 'uint'
```
This also causes a compilation failure when `/WX` is used.
@vitaut
Copy link
Contributor

vitaut commented Oct 12, 2022

In general we don't try to workaround "conflicts" with third-party libraries but I guess this is a pretty minor change so we can make an exception this time.

@vitaut vitaut merged commit cfb34a0 into fmtlib:master Oct 12, 2022
@Youw Youw deleted the patch-1 branch October 13, 2022 09:51
@Youw
Copy link
Contributor Author

Youw commented Oct 18, 2022

Fixes: #2809

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.

2 participants