Boost logo

Boost :

Subject: Re: [boost] Interest check: container with preallocated buffer
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2009-06-01 09:19:08

Dmitry Vinogradov skrev:
> Thorsten Ottosen wrote:
>> Dmitry Vinogradov skrev:
>>> Boost.Array offers constant size container with preallocated buffer,
>>> Boost.Optional provides from zero to one element. There are no STL
>>> container with preallocated buffer and it seems custom allocator does
>>> not help to do this with existing containers.
>>> Does any container exist to offer functionality like Boost.Array but
>>> allowing to store from 0 to N elements? Is there any interest in such
>>> container?
>>> PS. It's similar to fixed_string but as a generic container.
>> Please see
> By the way, you can use boost::serialization::array to serialize
> contained data.

No, I was looking for the optimized code without really finding it. Thanks.

> And, is it really needed to serialize capacity? (named "count"?!) I
> think it's unnecessary thing. Boost.Serialization library does not
> serialize capacity for standard containers.

Ok. I can avoid that.


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