Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-03-29 02:06:25


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


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