
2013/1/22 Olaf van der Spek <ml@vdspek.org>:
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 namespace? Regards, Adam