Boost logo

Boost :

From: Wyss, Felix (FelixW_at_[hidden])
Date: 2004-01-03 21:07:57


> > I think it would be better to mandate that resize()
> > 1) guarantees iterators remain valid
[Wyss, Felix] I would argue that resize() is semantically an invariant
operation on a hash table; it doesn't modify the content. It's an
operation to adjust the memory consumption and lookup performance
tradeoff at runtime. As a previous poster pointed out, the SGI
implementation guarantees that iterators remain valid.

> > 2) provides the strong exception guarantee
[Wyss, Felix] Same here, resize() is a semantically invariant operation.
It's easy to implement a hash table that provides the strong exception
guarantee for resize() by caching the hash code. This even increases
performance for types with expensive compares. I thus dare asking: Why
not?

>
> Why?
>
> --
> Dave Abrahams
> Boost Consulting
> www.boost-consulting.com
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk