
I grepped through the program_options source and couldn't find anything about declaratively specifying required options (or even more specifically, min/max # of occurrences), except for positional options. I know it's possible to do variables_map::count("option-name") or if I have an impossible default value bound to an option, I could check for that (default would = option absence), but it might be nice to have "requiredness" be a declared option trait, that could show up in the option description. value<int>(&myoption)->required() or something like that - obviously min/max wouldn't make sense for scalars (I have no use for min/max personally). -Jonathan p.s. I know there is a concept in the command line parser of "value required or not" - I'm talking about an *option* being required.