The concept sharg::validator seems to strict:
|
template <typename validator_type> |
|
concept validator = std::copyable<std::remove_cvref_t<validator_type>> && |
|
requires { typename std::remove_reference_t<validator_type>::option_value_type; } && |
|
requires(validator_type validator, |
|
typename std::remove_reference_t<validator_type>::option_value_type value) |
|
{ |
|
{validator(value)} -> std::same_as<void>; |
|
{validator.get_help_page_message()} -> std::same_as<std::string>; |
|
}; |
It enforces that a validator has a member type option_value_type. This is the only used as a parameter for operator().
This approach doesn't properly support validators that have template operator().
This collide with validators as used in raptor positive_integer_validator, which is a generic validator for any integer.
https://github.com/seqan/raptor/blob/e14ab05c538b3847348ab144a8f2a62ac6cc794a/include/raptor/argument_parsing/validators.hpp#L71-L107
The concept
sharg::validatorseems to strict:sharg-parser/include/sharg/validators.hpp
Lines 49 to 57 in 203eb81
It enforces that a validator has a member type
option_value_type. This is the only used as a parameter foroperator().This approach doesn't properly support validators that have template
operator().This collide with validators as used in raptor
positive_integer_validator, which is a generic validator for any integer.https://github.com/seqan/raptor/blob/e14ab05c538b3847348ab144a8f2a62ac6cc794a/include/raptor/argument_parsing/validators.hpp#L71-L107