
29 Dec
2010
29 Dec
'10
4:46 a.m.
On 28 December 2010 18:58, Dave Abrahams <dave@boostpro.com> wrote:
Yeah, an allocator with some internal storage that falls back to the heap when it's exausted would allow std::vector's to essentially use the "small string optimization."
Can you do that with just an allocator? How would swap work? Now, if you have static_vector (or equivalent), you could build a vector replacement out of that and std::vector. (I've been toying with this too, but it is not yet ready for prime time.) One other feature I'd like to see is a way to specify zero-initialized vs. uninitialized for POD-types. -- Nevin ":-)" Liber <mailto:nevin@eviloverlord.com> (847) 691-1404