exercism / exercism/cpp

Allow different containers for gradeschool

オープン
#357 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
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

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

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