No description, website, or topics provided.
C++ CMake Other
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.vscode
std2
.gitignore
CMakeLists.txt
LICENSE.md
README.md
allocator_test.cpp
build.bat
build.sh
cstyle.h
demo.cpp
iterator_test.cpp
step00.h
step01.h
step02.h
step03.h
step04.h
step05.h
step06.h
step07.h
step07a.h
step08.h
step09.h
step10.h
step11.h
stepN.h
vector_test.cpp
vector_test.h

README.md

Vector from scratch

Build a std::vector compatible vector from scratch.

for more info: http://www.sven-johannsen.de/slides/vector_from_scratch201605/index.html#/title-page

The project contain 2 targets:

demo

Contail all single steps to create a more less complete vector container.

vector_test

3 unit tests:

  • vector_test.cpp
  • iterator_test.cpp
  • allocator_test.cpp

The file vector_test.cpp runs all tests agains the std::vector and std2::vector to compare the demo code with standard library of the compiler.

Dependencies

Catch

Download the single file header from: https://raw.githubusercontent.com/philsquared/Catch/master/single_include/catch.hpp

Copy catch.hpp into the folder extern/catch.

CMake

minimal version: 2.8

How to build

mkdir build
cd build
cmake ..

TODO

  • insert for multiple elements
  • more tests