1

Consider a utility which can be used in different modes, like:

utility.exe --mode x (one list of arguments expected)
utility.exe --mode y (different list of arguments expected)

How can i write code for parsing such arguments in Boost.Program_Options???

anni
  • 338
  • 2
  • 12

1 Answers1

0

You could parse this mode out yourself (or with boost program options use a way that ignores unknown options), and then depending on that outcome, you could feed the cmd line arguments to different boost program option objects.

PlasmaHH
  • 15,673
  • 5
  • 44
  • 57