|
Boost Users : |
From: Bryan Green (bgreen_at_[hidden])
Date: 2007-07-27 13:20:39
Vladimir Prus writes:
> Bryan Green wrote:
>
> > Vladimir Prus writes:
> >>
> >> If you're volunteering, you're most welcome.
> >
> > Well, I'd really like to be able to get the functionality of GNU
> > getopt_long's 'optional_argument' feature. Do you have any sense of the
> > feasability of that? If it seems feasable, I might be able to take a
> > crack at it.
>
> I assume you mean that, for example
>
> --foobar=10
>
> explicitly provides a value of 'foobar', and
>
> --foobar
>
> provides some default value of 'foobar'. Something like that was actually
> supported, but it was somewhat messy. First of all, it requires
> two default values -- default value if the option is not provided at
> all, and value that is used when the option is provided, but without any
> explicit value. This is already nasty interface. Further, given
>
> --foo -1
>
> what is '-1'? Is it value to '--foo'? Or is it separate option? So,
> I decided that optional options are not really needed. I'm open
> to other opinions, but there should be some nice solution to the above
> problems.
>
> - Volodya
Vladimir, have you had a chance to look at the patch I submitted to the
mailing list for program_options optional ("implicit") arguments? Do you
have any issues with the solution? It would be great if this feature could
get incorporated into boost. I'd like to know what you think of it.
-Bryan
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