You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In grade school the container is chosen to be map<int, vector<string>> a better choice would be std::set<string> or std::multiset<string> instead of vector, because the list of students needs to stay sorted.
I see two ways to fix this:
Change the tests to expect a std::set or std::mutliset
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.
The text was updated successfully, but these errors were encountered:
In grade school the container is chosen to be
map<int, vector<string>>
a better choice would bestd::set<string>
orstd::multiset<string>
instead ofvector
, because the list of students needs to stay sorted.I see two ways to fix this:
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.
The text was updated successfully, but these errors were encountered: