Boost Users :
Subject: Re: [Boost-users] Program options negative arguments
From: David Doria (daviddoria_at_[hidden])
Date: 2009-05-03 16:42:43
> Use a command line style that does not think '-3' is an option. Multitoken
> options are BAD, exactly because of these ambiguities.
> - Volodya
Usually what I'm trying to do is input a 3d coordinate. I have tried to do
>(&Point)->default_value(vgl_point_3d<double>(0.0, 0.0, 0.0)), "set point")
But when I run the program with:
./Test --point 1 2 3
what(): in option 'point': invalid option value '1'
(the input operator is properly defined, ie
std::cin >> P;
works as expected).
This is why I resorted to a multitoken option. The other option I can think
of is --x 1 --y 2 --z 3, is that what you are recommending?
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