boostorg / boostorg/program_options

The parsing error of the multitoken argument with negative numbers

Open
#33 6 comments 5 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
136
Forks
117
PR merge metrics
No merged PRs in 30d

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
```cpp
("point,p", po::value>(&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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.