boost::program_options conditionally required option

86 Views Asked by At

My executable has two modes of operation which are selectable via --mode=foo or --mode=bar. If mode=foo, then --abc option should be required and --xyz should not be specified. If mode=bar, then --xyz option should be required and --abc should not be specified. What is the correct way to code that?

0

There are 0 best solutions below