Skip to content

Strong types for arithmetic_range_validator #120

@eseiler

Description

@eseiler

Cuurent stable API:

    arithmetic_range_validator(option_value_type const min_) :
        min{min_},
        max{std::numeric_limits<option_value_t>::max()},
        valid_range_str{"[" + std::to_string(min_) + "," + std::to_string(max_) + "]"}
    {}

Todo:
strong types, e.g. greater_than, less_than, etc. in the constructor can help to increase readability. We need to see how they can be implemented:

  • strong types sharg::greater_then (flies around in the main namespace..)
  • strong types sharg::arithmetic_range_validator::greater_then (is very long...)
  • designated initialisers sharg::arithmetic_range_validator{.greater_then = 3} (not sure if possible)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions