
On Dec 12, 2012, at 3:26 PM, Olaf van der Spek <ml@vdspek.org> wrote:
On Wed, Dec 12, 2012 at 11:57 PM, Nevin Liber <nevin@eviloverlord.com> wrote:
Another possible solution is to fall back on an allocator if there isn't enough room in the embedded storage. The signature would be something like
static_vector<T, N, A = std::allocator<T>>
And you could provide null_allocator_assert and null_allocator_throw as options (or make one of those the default), as it is now the responsibility of the allocator, not static_vector, to throw or not throw.
That'd make it more like a hybrid_vector, but it's certainly a good idea. It's like a string with a small string optimization.
To me, that's a different container. -- Marshall Marshall Clow Idio Software <mailto:mclow.lists@gmail.com> A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait). -- Yu Suzuki