Harsh Deshmane wrote:
Hi,
Multiple occurrences are definitely allowed and handled.
If you do specify the option value to populate a container, and then pass the containerpointer to the add_options() method, you can later iterate over the options.
[...]
Sorry, I should have been clearer. I know how to do multiple occurances of
options that require a value, what I want though is multiple occurances of
a switch. A single switch can be done with something like
desc.add_options()
("verbose,v", bool_switch(), "increase verbosity");
but this fails with a multiple_occurrences exception if more than one -v
option is supplied.
Multiple boolean options can be done with something like
desc.add_options()
("verbose,v", value