Boost logo

Boost :

From: Jonathan Graehl (boost_at_[hidden])
Date: 2004-09-26 22:26:08

Michael van der Westhuizen wrote:
> Vladimir Prus wrote:
>> Jonathan Graehl wrote:
>>> I grepped through the program_options source and couldn't find anything
>>> about declaratively specifying required options (or even more
>>> specifically, min/max # of occurrences), except for positional options.
>> Does "min/max" number of occurrences makes much sense? In
>> variables_map, an
>> option is either present, or not, it cannot be present twice.
> Yes, it does make sense. Two examples I can think of offhand are tcpdump
> and nmap, both of which allow you to specify the -v flag multiple times
> to increase verbosity.

:) Not exactly what I was thinking - if you have a vector/list value
type, doesn't each occurence of an option get appended to it? I
wouldn't personally care about min/max; required or optional are enough.

> I think that for now you'd have to use .count.
> - Volodya

I do, for now. It's not bad, but having the same information twice, in
different sections of code, isn't perfect (I need to quit changing my
options so much!)


Boost list run by bdawes at, gregod at, cpdaniel at, john at