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

Deprecation warning about std::char_traits<unsigned char> #4163

Closed
2 tasks done
nlohmann opened this issue Sep 24, 2023 · 9 comments · Fixed by #4179
Closed
2 tasks done

Deprecation warning about std::char_traits<unsigned char> #4163

nlohmann opened this issue Sep 24, 2023 · 9 comments · Fixed by #4179
Assignees
Labels
good first issue kind: bug solution: proposed fix a fix for the issue has been proposed and waits for confirmation

Comments

@nlohmann
Copy link
Owner

Description

When parsing a binary format from a std::vector<std::uint8_t>, there is a deprecation warning:

Screenshot 2023-09-24 at 11 36 41

Reproduction steps

Call nlohmann::json::from_bjdata on a std::vector<std::uint8_t>.

Expected vs. actual results

Expected: no deprecation warning.

Actual:

Screenshot 2023-09-24 at 11 36 41

Minimal code example

std::vector<std::uint8_t> vec {{ 0x7b, 0x55, 0x0b }};
nlohmann::json j = nlohmann::json::from_bjdata(vec);

Error messages

See screenshot above.

Compiler and operating system

Apple clang version 15.0.0 (clang-1500.0.40.1)

Library version

develop

Validation

@colbychaskell
Copy link
Contributor

@nlohmann I can start working on this

@nlohmann
Copy link
Owner Author

nlohmann commented Oct 5, 2023

Sure!

@perryHV
Copy link

perryHV commented Oct 8, 2023

Hii @nlohmann I want to work on this issue please assign me.

@nlohmann
Copy link
Owner Author

nlohmann commented Oct 8, 2023

Hii @nlohmann I want to work on this issue please assign me.

@colbychaskell is already working on this.

@AbuDarda25
Copy link

please assign this to me .
I will solve this issue in two days.

@nlohmann
Copy link
Owner Author

Go ahead.

@juwalter
Copy link

I have also been running into this. did you get a chance to work on this @AbuDarda25 @colbychaskell ?

@kleuter
Copy link

kleuter commented Nov 13, 2023

Very annoying indeed:
Screenshot 2023-11-13 at 12 22 12

@gregmarr
Copy link
Contributor

See #4179 for a potential fix.

@nlohmann nlohmann linked a pull request Nov 26, 2023 that will close this issue
4 tasks
@nlohmann nlohmann added the solution: proposed fix a fix for the issue has been proposed and waits for confirmation label Nov 26, 2023
@nlohmann nlohmann added this to the Release 3.11.3 milestone Nov 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue kind: bug solution: proposed fix a fix for the issue has been proposed and waits for confirmation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants