Allow different containers for gradeschool
- 主要言語
- C++
- スター
- 290
- フォーク
- 244
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
In grade school the container is chosen to be `map>` a better choice would be `std::set` or `std::multiset` instead of `vector`, because the list of students needs to stay sorted.
I see two ways to fix this:
1. Change the tests to expect a std::set or std::mutliset
2. Change the tests accept any type of container, as long as it compiles. We can do this using the std::result_of trait.
The second approach gives a student more room to play with things, while it can make it harder to understand what fails to compile/what the tests actually check. It will also require a better testing framework, as we would want to test a few examples.
This might be true also for other exercises.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず、小学校レベルの演習のテストを見つけ、学生コンテナ型が現在どのように制約されているかを確認します。提案されている std::set/std::multiset の要求と、std::result_of を介して適切な任意のコンテナを受け入れる方法を比較します。選択したアプローチが実装され、テストで関連するコンテナの動作がカバーされていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- cpp
- 領域
- testing-qa
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100