
29 Mar
2004
29 Mar
'04
7:06 a.m.
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