My program (prog.exe
) supports the following four flags: -P
, -p
, -b
and -s
. However:
-b
and-p
must be specified together, constitute a set, and have numeric values e.g.-b 42
-s
cannot be specified with the above set, and vice versa-P
is mandatory in both cases
As such prog.exe
can only be run as either
prog.exe -P -s
or
prog.exe -P -b -42 -p 8
Is there a way to specify the above sets of mutually exclusive command line options in boost program options?
parseOptions()
method of aboost::program_options
client application IMHO. – Leopoldeen