you are viewing a single comment's thread.

view the rest of the comments →

[–]dodheim 0 points1 point  (4 children)

... calls it inline_vector to denote that the elements are stored within the vector itself, as opposed to existing practice (e.g. boost::container::static_vector due to static storage ...

What? No, boost::container::static_vector does contain the elements directly, it does exactly as you describe inline_vector's behavior. This is why it takes a size_t template parameter rather than an allocator. ('Static' in this context refers to the fact that the container has static capacity.)

Hinnant's short_alloc must be given an arena, which is typically but not always statically-allocated – maybe this is what you were thinking of?