Boost logo

Boost Users :

Subject: [Boost-users] Program options negative arguments
From: David Doria (daviddoria_at_[hidden])
Date: 2009-05-02 10:43:19


If I setup a multitoken option like this:

desc.add_options()
            ("NumberList", po::value<vector<int> >()->multitoken(), "List of
numbers.")

and then call the program with:
./Program --NumberList 1 2 -3 4

it treats the number "-3" as a new flag so it produces an "unknown option"
error. Is there a way to handle this negative argument?

Thanks,

David



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