This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: Optimal time and space vector class
- To: libstdc++ at sourceware dot cygnus dot com
- Subject: Re: Optimal time and space vector class
- From: Nathan Myers <ncm at cantrip dot org>
- Date: Fri, 14 Apr 2000 13:44:18 -0700
- References: <14583.2423.282989.989291@rif28.iiic.ethz.ch>
- Reply-To: libstdc++ at sourceware dot cygnus dot com
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