Skip to content

Modernize integer comparison #4559

@nlohmann

Description

@nlohmann

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)

Metadata

Metadata

Assignees

Labels

solution: proposed fixa fix for the issue has been proposed and waits for confirmation

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions