boostorg / boostorg/program_options

The parsing error of the multitoken argument with negative numbers

オープン
#33 コメント 6 件 リアクション 5 件 担当者 0 名 GitHub で見る
主要言語
C++
スター
136
フォーク
117
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

示されているマルチトークンオプションと両方のコマンドライン例で問題を再現し、その後、最初のトークン以降の負の値を分類するコマンドラインオプション解析の経路を追跡します。`-p -1 -2 3` の呼び出しが受け付けられ、`-p -1 2 3` と同じベクトルを生成し、報告されたリグレッションに対するカバレッジが追加されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
cpp
領域
cli
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
40/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。