-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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 char_traits deprecation warning #4179
Conversation
🔴 Amalgamation check failed! 🔴The source code has not been amalgamated. @colbychaskell |
🔴 Amalgamation check failed! 🔴The source code has not been amalgamated. @colbychaskell |
92372b5
to
cb5b74e
Compare
Pushed a new commit that handles this a lot more cleanly. Will fix check errors soon |
7c8fa5f
to
def726f
Compare
1c50d24
to
bd9cb20
Compare
🔴 Amalgamation check failed! 🔴The source code has not been amalgamated. @colbychaskell |
@nlohmann Sorry for the delay, this is ready to be reviewed when you get a chance! |
cc5d600
to
6f573e9
Compare
@nlohmann it looks like something unrelated to these changes is breaking in the CI compiler tests as it's trying to get CMake and Ninja. Would this be related to recent CI fixes? The checks passed successfully with the same changes about a week ago. |
No, unfortunately this is unrelated. I am getting so tired of fixing CI issues rather than improving the library. I'll check during the weekend. |
6f573e9
to
299e426
Compare
36225e6
to
299e426
Compare
The failing checks are an unrelated CI issue that will be fixed in #4215 |
Please rebase to the |
299e426
to
543158b
Compare
@nlohmann rebased and good to go now! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Thanks a lot! |
Addresses issue #4163.
Fixes the deprecation warning for char_traits with signed and unsigned char. These types have been explicitly marked as deprecated in the latest version of LLVM.
More information on the deprecation can be found in this announcement from LLVM.
This creates a custom char_traits struct that will extend the std::char_traits struct. The primary template will simply use the std::char_traits for a given type, but the specializations will provide char_traits methods and traits for non-standard char types (unsigned and signed char).
Functions that relied on std::char_traits for these unsupported types have been updated to use the custom char_traits implementation.
Pull request checklist
Read the Contribution Guidelines for detailed information.
include/nlohmann
directory, runmake amalgamate
to create the single-header filessingle_include/nlohmann/json.hpp
andsingle_include/nlohmann/json_fwd.hpp
. The whole process is described here.Please don't
#ifdef
s or other means.