|
Boost Users : |
Subject: Re: [Boost-users] program_options
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2009-12-08 07:26:32
OvermindDL1 wrote:
> On Mon, Dec 7, 2009 at 9:37 AM, Larry <lknain_at_[hidden]> wrote:
>> Actually, I think you can setup through the mostly undocumented style_t
>> enumeration for using
>> a "/" but it is not automatic as I recall. See cmdline.hpp for the style_t
>> definition. It also took a
>> little looking to figure out how to set style_t. I did it once a couple of
>> years ago and I forget offhand
>> how I did it but could find it if needed.
>
> That is something I do like about the windows format using / instead
> of -. I have used a few windows command-line apps that use / to
> specify options, - to remove something, and + to add something. Makes
> more sense to me over all; would be nice to have program_options
> support that style as well.
>
> Example:
> someapp /input=file.tst -optimize +abc
> Means: the input is file.tst, you disable optimizations, and you
> enable automatic bounds checking or whatever...
FWIW, this +something -whatever convention is similar to -fno-something/-fsomething
convention such as used, e.g., by gcc. One can use a custom parser to support either,
I think there's example of the latter style.
- Volodya
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net