boostorg / boostorg/program_options

non static member shadows

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

説明

When compiling with clang 19.1.7 on Alma with -Werror and a number of other flags (we run with most warnings enabled), the line https://github.com/boostorg/program_options/blob/develop/include/boost/program_options/parsers.hpp#L162 was flagged with `error: non-static data memeber 'm_desc' of 'basic_command_line_parser' shadows member inherited from type 'cmdline' [-Werror, -Wshadow-field]`. We opted to add a local patch to suppress this using pragma push/pop at the above location. Someone with more familiarity with the code may have a more appropriate solution. If the push/pop is the desired solution, happy to submit a PR with that change included.

Env:
Alma 9.6
Boost 1.88.0 via cmake
clang 19.1.7

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

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

調査の方向性

clang 19.1.7 が m_desc に対する継承メンバーのシャドーイング警告を報告している、include/boost/program_options/parsers.hpp の 162 行付近を調査してください。Alma 9.6 上で Boost 1.88.0 と報告されている警告フラグを使って警告を再現し、選択した変更によって -Wshadow-field エラーが解消され、コマンドライン解析の動作が変わらないことを確認してください。

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

評価

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

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

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