Boost logo

Boost :

Subject: Re: [boost] [container] static_vector: fixed capacity vector update
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 2013-01-22 10:19:58

2013/1/22 Olaf van der Spek <ml_at_[hidden]>:
> On Tue, Jan 22, 2013 at 2:33 PM, Adam Wulkiewicz
> <adam.wulkiewicz_at_[hidden]> wrote:
>>> That's just a single bit.
>> No, because static part will be created on stack and if external storage was
>> created by non-std allocator then hybrid_vector would have a full set of
>> additional members.
> You need either those members or the static storage, not both at the
> same time, so they could share the same space.

Yes, then additional creation and move of those members would be needed while
moving to the new memory but this is probably not significant.

On the other hand we could store the whole static_vector or vector in
the storage
inside the hybrid_vector. We couldn't use size/capacity to store this
flag bit but I'm
not so sure if I'd do it anyway because it would decrease the max size
of the container.
And again creation and move of a vector would be required like in the
previous case,
this time with allocator which is stored inside.


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