| 190 | |
| 191 | === 5. Enhanced vector and deque containers === |
| 192 | Potential mentors: Thorsten Ottosen |
| 193 | |
| 194 | |
| 195 | ==== Background ==== |
| 196 | |
| 197 | For certain applications the standard constainers std::vector and std::deque are not too easy to work or may induce |
| 198 | unnecessary overhead. For example, std::vector lacks an O(1) time push_front and std::deque allows you no way |
| 199 | of controlling the size of the underlying segments. This limits their usability in certain contexts, especially if you |
| 200 | want to have optimal performance. |
| 201 | |
| 202 | ==== GSoC project proposal ==== |
| 203 | |
| 204 | Write full-fledged and enhanced C++11 versions of std::deque and std::vector with extra functionality that |
| 205 | gives the programmer more control over buffers, segments and iteration. |
| 206 | |
| 207 | ==== Programming competency test ==== |
| 208 | |
| 209 | Write a small vector-like C++11 container. The capacity is set in the constructor. push_back throws when the buffer is full. |
| 210 | It should work efficiently with both strings and ints. push_back should have the strong exception-safety gusrantee. The class may not |
| 211 | leak any resources. Iterators may be pointers. Put noexcept on every function where it makes sense. Write unit-tests for all |
| 212 | functions. Write a unit-test that proves that your implementation of push_back has the strong exception-safety guarantee. |
| 213 | |