No, you canβt. All options are described here . You can check them manually or write a function that will check them manually.
opt::value<unsigned short>()->default_value(5)->notifier(&check_function);
where the check function is something like
void check(unsigned short value) { if (value < 0 || value > 10) {
or more general
template<typename T> void check_range(const T& value, const T& min, const T& max) { if (value < min || value > max) {
Forvever
source share