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

visual studio 2019 gives error C2049 #1897

Merged
merged 1 commit into from
Sep 23, 2020
Merged

Conversation

rglarix
Copy link
Contributor

@rglarix rglarix commented Sep 23, 2020

visual studio 2019 gives error C2049 ('fmt::v7': non-inline namespace cannot be reopened as inline) when compiling fmt with /clr)

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

… cannot be reopened as inline) when compiling fmt with /clr)
@vitaut vitaut merged commit 1305cbe into fmtlib:master Sep 23, 2020
@vitaut
Copy link
Contributor

vitaut commented Sep 23, 2020

Thanks

@rglarix
Copy link
Contributor Author

rglarix commented Sep 24, 2020

thanks to you for wonderful fmt!

@rglarix rglarix deleted the vs2019_clr branch September 24, 2020 05:53
@Chronial
Copy link

Thanks for the fix, this has been bugging us for quite a while now. 🥳

vadz added a commit to vadz/fmt that referenced this pull request Mar 15, 2021
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 pushed a commit that referenced this pull request Mar 17, 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.
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