Skip to content

Unintuitional behaviour of range(-1,1) #13318

@hirschenberger

Description

@hirschenberger

When iterating by using range with signed variables, the iteration doesn't start at all because the int gets converted to uint and -1 is set to std::uint::max, that's unintuitional.
There should be a runtime error (start > end) or the use of uint should be enforced somehow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions