std::vector has methods other than push_back and pop_back