
7 Oct
2008
7 Oct
'08
3:06 p.m.
Khaikin, Sergey wrote:
Hi,
This question was originally brought up here:
http://lists.boost.org/boost-users/2006/08/21633.php
but unfortunately was not answered. What I basically want to do is to enable something like running
$ myprog -v -v -v
Where -v is some Boolean switch.
Boolean? What would be the semantics of multiple occurences? If you want integer variable that is incremented by 1 for each occurrence, then I think this is entirely syntax matter, and probably is best handled by taking vector<option> returned by parse_command_line, finding all -v occurences, and merging them into a single option, with a value equal to the number of occurrences. There is no built-in way to do this. - Volodya