|
Boost : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-05-06 09:49:50
Neal D. Becker wrote:
> 1. Is it possible to expand --help so that it also gives the default values
> of options? Obviously, it's not likely to tell defaults that it doesn't no
> about, but at least the ones specified by default_value()?
I need to think about it. The biggest issue I see that that it would mean that
if you have option of type T then T would be required to have operator<<,
which might be too severe limitation.
> 2. What was the resolution to the earlier problem of confusing a negative
> parameter value with an option?
I think I've fixed that. See the attached.
- Volodya
attached mail follows:
Hi Neal,
> There is a bug in program_options. Now I remember, this is why I stopped
> using it before.
>
> It can't accept negative numbers as command line arguments!
I've just comitted a test and a fix for this problem.
The log message, which explains the fix, is:
Solve a problem which prevented specifying negative values. Previously,
-a -1
was always parsed as two separate options. Now, we check if '-a'
requires value and '-1' is not a recognized option. In that case, we
treat '-1' as value.
> int main (int argc, char** argv) {
> double angle;
I've cheched your example, and now it works.
Thanks,
Volodya
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk