Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-05-22 03:22:34


Hi Marcelo,

Marcelo E. Magallon wrote:

> I have just a couple of comments after reading Chuck's Review and
> Vladimir's replies. I have written a similar library for internal use,
> although not as comprehensive.
>
[...]
> > * Adaptive formatting (first field width)
>
> Vladimir says that changing the output (after adding more options)
> could be confusing for the user. I beg to disagree. autoconf
> generated configure scripts had no facility to adjust the formatting
> according to the widest option and the output is very confusing since
> it's hard to tell appart option descriptions from option names.

I agree partially. Something like

   --version : print version
   --include_path=path : add include path

is indeed not nice. The question is: would it be better if the ":" column
is printed at some fixed position, say column 20. It can be shifted further
if needed, but as long as you don't give options longer that 20 symbols,
the position of ":" symbol does not change.

> A question of my own:
>
> How to handle non-option arguments? e.g. "$ cat file", I'm sure it's
> there but I couldn't spot it in the documentation.

You can use options_and_arguments::arguments() method. See
http://boost-sandbox.sourceforge.net/program_options/html/classboost_1_1program__options_1_1options__and__arguments.html#a1

Chuck suggests that arguments are given better support, though.

> I took a couple of my programs and replaced my own library by
> program_options. It went quite well and I found program_options to be
> simple to use.

Glad to know that!

Thanks,
Volodya


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk