Boost Users :
From: François Duranleau (duranlef_at_[hidden])
Date: 2006-09-18 12:49:03
On Sat, 16 Sep 2006, Jason House wrote:
> I recent attempted the equivalent of allowing the follwoing two options:
> --help-command [arg]
> --help-component [arg]
> When I ran the program with --help, I got an error that it was
> ambiguous. I didn't realize it, but program options allows the user to
> not specify the full string with "--". This then makes all the options
> above match --help.
> How can I get this type of functionality without getting runtime
> errors about ambiguity?
> If I were to reduce it to just --help and --help-command, it may be
> possible to just do --help with an optional argument, but I don't know
> how to do that. Currently, I'd like to avoid a shared namespace for
> commands and components.
You need to deactivate the command line style 'allow-guessing' using the
style member function of your command_line_parser. See
-- François Duranleau LIGUM, Université de Montréal
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