The parsing error of the multitoken argument with negative numbers
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 40/100
Research direction
Reproduce the issue with the shown multitoken option and both command-line examples, then trace the command-line option parsing path that classifies negative values after the first token. Done means the -p -1 -2 3 invocation is accepted and produces the same vector as -p -1 2 3, with coverage for the reported regression.
Written by the indexing model from the issue text.
Description
The parsing error of the multitoken argument with negative numbers occurs while setting negative numbers after the first number.
For example, if we set an option
("point,p", po::value<std::vector<float>>(&options.point)->multitoken(), "The point")
and enter in the command line the following values
prog -p -1 2 3
It works correctly.
However, if we enter the values given bellow
prog -p -1 -2 3
the parsing error occurs
unrecognised option '-2'
This error exists in Boost 1.65.1 as well.
- Dominant language
- C++
- Stars
- 136
- Forks
- 117
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from boostorg/program_options
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
boostorg/program_options#147 ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
boostorg/program_options#146 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
boostorg/program_options#144 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
boostorg/program_options#142 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 30/100
boostorg/program_options#139 ·
All issues in boostorg/program_options
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·