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:33:46

2013/1/22 Olaf van der Spek <ml_at_[hidden]>:
> Given that hybrid functionality is desired too I think it makes sense
> to provide it.
> Then, if static vector really can't be provided efficiently as a case
> of hybrid_vector could you implement static vector.

To implement a hybrid_vector fast as a static_vector for
null_allocator one should provide two versions of algorithms and
members (additional allocator object). The default one would work for
arbitrary allocators (hybrid_vector), the specialized one for
null_allocator, not checking unnecessary conditions. It would work
exactly like current implementation of the static_vector. The result
would be 2 containers with the interface of hybrid_vector.
This isn't much different than what we're proposing. In fact one of
our questions was: should the static_vector be moved to detail


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