exercism / exercism/cpp

Allow different containers for gradeschool

Đang mở
#357 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C++
Star
290
Fork
244
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.