Is it possible to set minimum and maximum limit of a value (suppose it is unsigned short and I need a value between 0 and 10) as I can set default value by
opt::value<unsigned short>()->default_value(5)
I want to use arguments given from variables map of program options immediately without checking each of them.
value<unsigned>
is still passed as 4294967295 to the notifier function, unless being very careful with the type to "cast" it back to something. Optimally I would like to fail on any input that is out of range for the specified type. – Bracteate