
On Mon, Jan 21, 2013 at 10:29 AM, Nevin Liber <nevin@eviloverlord.com>wrote:
On 21 January 2013 11:19, Andrew Hundt <athundt@gmail.com> wrote:
On Mon, Jan 21, 2013 at 10:45 AM, Olaf van der Spek <ml@vdspek.org> wrote:
What happened to hybrid array/vector?
Strictly speaking it's not a proper superset since there are some fundamental interface differences between a container with a hard size limit of N vs one with a more flexible size limit.
I see no fundamental difference between your solution and a hybrid vector with a null allocator.
[...] I would expect sizeof( static_vector ) < sizeof( hybrid_vector ) (even with EBO used for storing the allocator in the latter case), as hybrid_vector needs to discriminate between using internal and using external storage. Additionally, this will sometimes necessitate more branching and/or indirection in hybrid_vector than in static_vector for the same operation. Well, really, that's all just a guess, I haven't actually gone and implemented each myself. And it's assuming that hybrid_vector< T, N, null_allocator<T> > isn't special-cased to behave like a static_vector<T,N>, because, at that point, now we're just arguing over names. - Jeff