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

Fix harmless MSVS warning about using undefined _MANAGED symbol #2183

Merged
merged 1 commit into from Mar 17, 2021

Conversation

vadz
Copy link
Contributor

@vadz vadz commented Mar 15, 2021

Since the changes of 1305cbe (Fix MSVC2019 error C2049 when compiling
with /clr (#1897), 2020-09-23), compiling fmt with MSVS 2019 resulted in

fmt\include\fmt\core.h(180,32): warning C4668: '_MANAGED' is not defined
as a preprocessor macro, replacing with '0' for '#if/#elif'.

when the (disabled by default) warning C4668 was enabled.

Fix this simply by checking if _MANAGED is defined before testing it.


I agree that my contributions are licensed under the {fmt} license, and agree to future changes to the licensing.

Since the changes of 1305cbe (Fix MSVC2019 error C2049 when compiling
with /clr (fmtlib#1897), 2020-09-23), compiling fmt with MSVS 2019 resulted in

fmt\include\fmt\core.h(180,32): warning C4668: '_MANAGED' is not defined
as a preprocessor macro, replacing with '0' for '#if/#elif'.

when the (disabled by default) warning C4668 was enabled.

Fix this simply by checking if _MANAGED is defined before testing it.
@vitaut vitaut merged commit 2f3f386 into fmtlib:master Mar 17, 2021
@vitaut
Copy link
Contributor

vitaut commented Mar 17, 2021

Thank you!

sthagen added a commit to sthagen/fmtlib-fmt that referenced this pull request Mar 17, 2021
Fix harmless MSVS warning about using undefined _MANAGED symbol (fmtlib#2183)
@vadz vadz deleted the msvc-managed-warn-fix branch April 7, 2021 12:18
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.

None yet

2 participants