|
Boost : |
From: Darin Adler (darin_at_[hidden])
Date: 2002-02-05 12:56:57
It seems to me that there's a significant design problem with
fixed_capacity_vector. Unlike a std::vector, the storage for the elements
starts out with default-constructed objects. This means that if you
construct a fixed_capacity_vector and then put 1000 objects in it, you end
up creating and then overwriting 1000 default-constructed objects. This is
not true of a std::vector.
I think that we should look into fixed_capacity_vector implementations that
don't behave this way; for one thing, it would make them more compatible
with vector, and for another, it would make them more efficient.
Unfortunately, if we want to define a class that has an array of
appropriately-aligned uninitialized memory, we may run into trouble doing
that portably.
-- Darin
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk