is it possible to parse multiple mulit-token parameters with the same name?
Like: program.exe --param a b c --param foo bar ?
I only could get it to work like this:
program.exe --param "a b c" --param "foo bar" but then I have to split the parameter myself.
[...]
options.add_options()("param", po::value<vector<string>>()->multitoken()
, "description")
[...]
thanks for any hints
I think you want a combination of composing and multi-token:
Live On Coliru
Which prints e.g.:
UPDATE
To the comment:
You can always use the parser section of the library, inspecting the
parsed_optionsinstance:See it Live On Coliru, printing: