New function as alternative to `operator[]` for read and write
まだ誰も着手していません。
評価
調査の方向性
Start by reading the public Node API and its tests to see how operator[] handles both reads and writes, including missing keys and exceptions. Identify an alternative function that supports both operations and determine its expected behavior from the existing API. Done means the proposed API is clear and tested for reading and writing YAML nodes.
索引モデルが issue の本文から書いたものです。
説明
Example:
YAML::Node node = YAML::LoadFile(constant::file::configuration);
const double commission_factor = node["factor"].as<double>();
node["factor"] = 4.532;
It would be beneficial to have an alternative function instead of the overloaded operator operator[] to please the clang-tidy recommendation to not use overloaded operator[], https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/pro-bounds-avoid-unchecked-container-access.html. This is needed for read and write operations.
This makes sense as in the STL operator[] does not throw exceptions but rather aborts the programme and thus is not recommended.
- 主要言語
- C++
- スター
- 6.1k
- フォーク
- 2.2k
- 平均マージ
- 22時間 2分
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
jbeder/yaml-cpp のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 62/100
-
難易度 3/5 半日 初心者へのやさしさ 55/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 62/100
jbeder/yaml-cpp の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
microsoft/microsoft-ui-xaml#12515 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
FujiNetWIFI/fujinet-firmware#2261 ·
メンテナーはふだん 1 日以内に返信
-
bug difficulty: easy good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
nagisa-kamishiro/rosehip#73 ·
メンテナーはふだん 1 日以内に返信
-
bazel bug odb
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
The-OpenROAD-Project/OpenROAD#12095 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信