<div dir="ltr">In EASTL <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2271.html">http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2271.html</a> there is something like SSO (Small String Optimization) applied to std::vector (and other STL containers)<br>
<br>[begin quote]<br>&quot;Fixed containers are fixed-size containers with their memory stored
right within the container itself. Fixed containers allocate no dynamic
memory and their memory tends to be cache-friendly due to its
contiguity and proximity to the container&#39;s housekeeping data. The user
declares the max container size as a template parameter, and can also
specify that if the container overflows that an auxiliary dynamic
allocator is used.<br><br><pre class="small_example_code">template &lt;typename T, size_t nodeCount, bool enableOverflow = true, <br>          typename Allocator overflowAllocator = EASTLAllocator&gt;<br>class fixed_vector<br>
{<br>   ...<br>};</pre>[end quote]<br><br>I have tried a similar approach using some sort of fixed_buffer_with_overflow allocator, with no success. I&#39;m not sure SSO is even possible just using an allocator with the standard containers, because I always end up with stateful allocators.<br>
<br>So my question is if there is something similar already in boost.<br><br>TIA<br><br></div>

