Subject: [boost] Re: [program_options] nasty bug!
From: Vladimir Prus <[email-masked]>
To: [email-masked]
Date: Mon, 29 Mar 2004 11:06:25 +0400
List-Id: Boost mailing list <boost.lists.boost.org>

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