Opened 9 years ago
Last modified 7 years ago
#8588 new Bugs
program_options eats parameter instead of reporting previous one missing an argument
Reported by: | Owned by: | Vladimir Prus | |
---|---|---|---|
Milestone: | To Be Determined | Component: | program_options |
Version: | Boost 1.53.0 | Severity: | Problem |
Keywords: | Cc: |
Description
If a parameter is specified with a mandatory argument, but the argument is omitted, the following parameter is used as the argument instead. For example:
./test --dump-firmware Invalid command line syntax: the required argument for option '--firmware' is missing. Use --help for help. ./test --dump-firmware --help dumping firmware to file: --help
Here, --dump-firmware requires an argument, and "--help" is passed in as the argument. Instead, "--help" should be treated as a parameter (either valid or not) and --dump-firmware should report a missing parameter instead.
Attachments (1)
Note:
See TracTickets
for help on using tickets.
Example to demonstrate the issue