replace std::vector by normal pointers. store capacity and size for each primitive type (as int).
std::vector
int