Jakub Jelinek <ja...@redhat.com> writes:

> But do we really want to use std::vector?  The vec.h, appart from
> having ugly syntactic sugar, seems to be more space efficient, has better
> aliasing properties (given that it is just one pointer, you can e.g. use
> restrict on it easily) and seems to have more operations than std::vector has
> (std::vector has 3 pointers, while vec is just one pointer + 2 unsigned
> ints, I don't see counterparts to operations like VEC_quick_push or
> VEC_unordered_remove).

std::vector can be printed by gdb today.  Admittedly we could add
similar support for VEC.  The std::vector operations are shorter and
easier to read and write.

VEC_quick_push is implemented by std::vector::reserve and
std::vector::push.  VEC_unordered_remove is easy enough to write using
std::vector::operator[] and std::vector::pop.

Ian

Reply via email to