Optimal time and space vector class
Nathan Myers
ncm@cantrip.org
Fri Apr 14 13:44:00 GMT 2000
On Fri, Apr 14, 2000 at 02:05:11PM +0200, Thomas Holenstein wrote:
> > - is it exception-safe, according to the Standard requirement?
> > - does it use allocators properly?
> > - does it conform to the amortized-constant allocation time requirement?
> > - does it take advantage of the empty-base space optimization supported
> > under -fnew-abi?
> I hope so. Probably not right now...
>
> > Also, does it still use a continious block of memory [...]?
> Definitely not. This obiviously is not possible with the worst case
> O(1) push_back method. On the other hand, elements are never copied
> in memory.
This looks like an extremely useful library component.
However, we cannot use it in libstc++, for the reason
above. (The committee is planning to formalize it.)
Instead, get in touch with the Boost group: www.boost.org
Give it a different name (stable_vector or something) and
submit it there. They will be equally -- or more -- picky
about things like exception safety, and (in fact) they
understand those things better. It will probably get wider
use as a component of the Boost library than as an "alternative
std::vector", anyway.
Nathan Myers
ncm@cantrip.org
More information about the Libstdc++
mailing list