Boost logo

Boost :

From: Boris (boris_at_[hidden])
Date: 2005-10-03 18:20:47

"Pavel Vozenilek" <pavel_vozenilek_at_[hidden]>,
> "Boris" wrote:
>>> We have boost::array but just like with std::bitset you need to know the
>>> size at compile time. Is there any interest in boost::dynamic_array (I
>>> mean is anyone else interested except me :-)?
>> Before anyone wonders: I'm talking about a fixed-size array whose size is
>> set at runtime. boost::dynamic_array is probably not a suitable name as
>> someone might think then of std::vector.
> How would such dynamic_array be better (different) than std::vector?

I wouldn't say it's better. It would be just a bit more suitable in a
situation where you know that you will deal with a fixed number of elements
at runtime. The interface would be probably similar to std::vector but
without inserting/removing operations. While std::vector is the natural
choice when you need a dynamic array and boost::array when you know the
(fixed) size at compile time this new array type (whatever the name would
be) would be chosen when you know the (fixed) size only at runtime.


Boost list run by bdawes at, gregod at, cpdaniel at, john at