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

Modernize integer comparison #4559

Closed
nlohmann opened this issue Dec 18, 2024 · 2 comments · Fixed by #4581
Closed

Modernize integer comparison #4559

nlohmann opened this issue Dec 18, 2024 · 2 comments · Fixed by #4581
Assignees
Labels
solution: proposed fix a fix for the issue has been proposed and waits for confirmation

Comments

@nlohmann
Copy link
Owner

Yeah, since all the current usages are safe, and the compiler is apparently looking right through the cast that we're using to make it "safe", then I think it's fine to log it for the future. Maybe we can use std::numeric_limits<std::size_t>::max() instead of static_cast<size_t>(-1).

Originally posted by @gregmarr in #4558 (comment)

@nlohmann
Copy link
Owner Author

See #4558 for more information.

@nlohmann
Copy link
Owner Author

Go ahead! Let me know if you need anything.

shivenducs1136 added a commit to shivenducs1136/json that referenced this issue Dec 21, 2024
@nlohmann nlohmann added this to the Release 3.11.4 milestone Jan 1, 2025
@nlohmann nlohmann added solution: proposed fix a fix for the issue has been proposed and waits for confirmation and removed good first issue labels Jan 1, 2025
@nlohmann nlohmann self-assigned this Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

1 participant