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

> Why?
> --
> Dave Abrahams
> Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at