Use the _MSVC_STL_UPDATE macro to detect STL#4267
Merged
vitaut merged 2 commits intofmtlib:masterfrom Dec 19, 2024
YexuanXiao:master
Merged
Use the _MSVC_STL_UPDATE macro to detect STL#4267vitaut merged 2 commits intofmtlib:masterfrom YexuanXiao:master
vitaut merged 2 commits intofmtlib:masterfrom
YexuanXiao:master
Conversation
vitaut
requested changes
Dec 19, 2024
Contributor
vitaut
left a comment
There was a problem hiding this comment.
Overall looks good but please fix the issue reported in CI. You might want to use #ifdef instead of #if to fix it.
Contributor
Author
If the macro is not defined, it will be replaced with 0. The STL never defines _MSVC_STL_UPDATE as 0, so there is no visible difference here. However, if the code style requires it, I am glad to fix it. |
vitaut
approved these changes
Dec 19, 2024
Contributor
|
Merged, thanks! |
This was referenced Dec 25, 2024
This was referenced Mar 3, 2025
1 task
1 task
1 task
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The current code's method of detecting the C++ standard library as STL is inaccurate, which will reject libc++ on Windows. The _MSVC_STL_UPDATE macro is the documented way. fmt currently requires Visual Studio 19.0, and this macro has existed since Visual Studio 15.5, so there are no compatibility issues.