B0

Материал из SEWiki
Перейти к: навигация, поиск

Осенний Семестр

TBD

Весенний Семестр

#2 Vector

Part One

Implement vector-alike container matching performance requirements of the `std::vector`.

It should contain implementation for the following methods matching behaviour of the ones of `std::vector`:

  • push_back
  • pop_back
  • insert
  • clear
  • resize
  • back
  • begin/rbegin
  • end/rend

As a reference consider en.cppreference.com.

Part Two

Implement specialization of already implemented (template-) container for the simple type `bool` being as compact as possible.

#3 Throwing Vector

Now you've got an insight what the C++ exceptions are, implement all error handling inside your implementation of the `vector`, relying solely upon the exceptions mechanism.

That means: no more `_Exit`s, `abort`s, etc. Exceptions only.