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?
Asked
Active
Viewed 47 times
2

Paul Grinberg
- 1,184
- 14
- 37
-
3I don't think there is any support for this, you'll have to validate it yourself after parsing the arguments – Alan Birtles Jan 06 '23 at 20:25