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

Open
nlohmann opened this issue Dec 18, 2024 · 3 comments
Open

Modernize integer comparison #4559

nlohmann opened this issue Dec 18, 2024 · 3 comments

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.

@shivenducs1136
Copy link

Hi @nlohmann I want to take this up!

@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants