nlohmann / json

JSON for Modern C++
https://json.nlohmann.me
MIT License
41.33k stars 6.58k forks source link

Fix char_traits deprecation warning #4179

Closed colbychaskell closed 7 months ago

colbychaskell commented 9 months ago

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.

Please don't

coveralls commented 9 months ago

Coverage Status

coverage: 100.0%. remained the same when pulling 543158bbf3efe123d59832e26a89ebf63c9e5eb7 on colbychaskell:develop into f56c6e2e30241b9245161a86ae9fecf6543bf411 on nlohmann:develop.

github-actions[bot] commented 9 months ago

šŸ”“ Amalgamation check failed! šŸ”“

The source code has not been amalgamated. @colbychaskell Please read and follow the Contribution Guidelines.

github-actions[bot] commented 9 months ago

šŸ”“ Amalgamation check failed! šŸ”“

The source code has not been amalgamated. @colbychaskell Please read and follow the Contribution Guidelines.

colbychaskell commented 8 months ago

Pushed a new commit that handles this a lot more cleanly. Will fix check errors soon

github-actions[bot] commented 8 months ago

šŸ”“ Amalgamation check failed! šŸ”“

The source code has not been amalgamated. @colbychaskell Please read and follow the Contribution Guidelines.

colbychaskell commented 8 months ago

@nlohmann Sorry for the delay, this is ready to be reviewed when you get a chance!

colbychaskell commented 7 months ago

@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.

nlohmann commented 7 months 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.

colbychaskell commented 7 months ago

The failing checks are an unrelated CI issue that will be fixed in #4215

nlohmann commented 7 months ago

The failing checks are an unrelated CI issue that will be fixed in #4215

4215 is merged.

nlohmann commented 7 months ago

Please rebase to the develop branch. This should fix the CI. I would like to take this as last item for the upcoming release.

colbychaskell commented 7 months ago

@nlohmann rebased and good to go now!

nlohmann commented 7 months ago

Thanks a lot!