Subject: Re: [boost] Stack-based vector container
From: Nevin Liber (nevin_at_[hidden])
Date: 2010-12-28 23:46:40
On 28 December 2010 18:58, Dave Abrahams <dave_at_[hidden]> 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_at_[hidden]> (847) 691-1404
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk