Skip to content

Disallow setting range constraints for types that should not have them #2184

@tylerjw

Description

@tylerjw

This probably has to be done at runtime. I would consider the cost of this error-checking reasonable because someone should not be setting range constraints in a hot loop. It would be ideal to check this at compile time for developer ergonomics, but that is impossible.

An example would be that setting an integer range for a boolean makes no sense. Reference: osrf/ros2_test_cases#1014 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions