Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-09-17 00:56:03

Hi Jonathan,

>>here's another possibility:
>> value<type>(&variable, "filename")->......
>>something like that was in the pre-review version, with the difference
>>that the value name was also used to specify flags, e.g "filename?" would
>>mean the value is optional.
> Yes ... I like this best.

Ok, noted.

>>> Also, I'm not sure why 0-argument items couldn't appear in a config
>>> file. I declare the number of arguments used by options before I parse
>>> the config file, after all.
>>Because the current config parser, systantically, requires that everything
>>specified there has a value. If you specify that an option accepts no
>>explicit value, it can't be present in config file.
> OK, your statement was with reference to the current config parser ;)


> A newer parser could recognize the end of an option name first, then
> interrogate the option to see if it takes an argument, then if it does,
> expect to parse a "= value".

Hmm... that would mean that you can specify a value in config file for an
option which does not allow a value?


    ("foo", bool_switch()....

and then in config file:


then "false" will be just ignored? OTOH, it might be reasonable to decide
that the desired number of tokens applies only to command line, since other
sources don't have any parsing ambiguities.

- Volodya

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