exercism / exercism/cpp

Allow different containers for gradeschool

未關閉
#357 0 則留言 0 個 reaction 已指派 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.

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。