Subject: [boost] [program_options] multitoken arguments
From: Carlo Medas (carlomedas_at_[hidden])
Date: 2009-04-03 03:15:23
we've been using boost::program_options and it works great.
We just found a minor thing, which could be an issue, and I'm reporting it
to you: when specifying and using a multitoken argument, it actually works
only if put as last parameter of command line; in any other case, it eats
all remaining parameters.
My specification is as follows:
("output,o", bpo::value<std::vector<std::string> >()->multitoken(), "use
output setup for discovery/scan");
If then I want to use it like follows, it works:
> fing -p1 -p2 -p3 -o 1 2 3
But if the user inverts the order, it does not work anymore, meaning that p3
is eaten by -o option.
> fing -p1 -p2 -o 1 2 3 -p3
Is this a known limitation? Or maybe my specification above is not correct?
Thanks in advance,
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk