Subject: Re: [boost] Interest in StaticVector - fixed capacity vector
From: Andrew Hundt (athundt_at_[hidden])
Date: 2011-10-10 16:53:35
> > I believe there is interest -- in fact, there's already such a library in
> > the review queue. It's Thorsten Ottosen's AutoBuffer library.
It appears there is only malloc allocation available in AutoBuffer now, not
the in-object allocation I use. While I'm trying to maintain the simplicity
of boost.array with size tracking, that may not be others' goal. I would be
happy to try adding the allocation style of StaticVector as an additional
allocator in AutoBuffer. Unfortunately, I am not sure how I could add the
functionality I'm looking for to AutoBuffer myself. Is there a resource I
could use to learn what I need to allocate the memory block inside the
AutoBuffer object itself without pointers to externally allocated memory? It
would be greatly appreciated.
> I had thought that was slightly different. I may be misremembering, but I
> had thought StaticVector has a statically-determined maximum size, while
> AutoBuffer is something like a variant< StaticVector, std::vector >...
I happen to be using it in an embedded environment myself, but I can use
exceptions. Is there some good example code somewhere that I can use as a
style guide for implementing a no exceptions option?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk