Boost logo

Boost :

From: Lipik Contact (contact.lipik_at_[hidden])
Date: 2008-01-03 08:05:31

Hello list,

I have downloaded unordered library from the vault and plan to start
using it. However, looking at the documentation, there might be issues
that prevent it being useful for me. Could someone please comment on
the following:

If the user holds a reference (or pointer) to some element in the
container (e.g. T const *p = &*it), is that reference guaranteed to
remain valid after the insertion/erase of some other elements? I ask
because doc says that erasing through an iterator can be O(size) -
which seems to suggest that erase can lead to a rehash, invalidating
This appears to contradict the iterator lifetime guarantee posited by
the standard (after all, tree based containers don't rebalance after
erase, do they?)

Another question: any thoughts on whether it is better to use
boost::hash for pointers and wstrings, or would a modification of the
FNV hash included with unordered give better results?

Also, I'm assuming that I can plug this library into boost-1.33.1.

Many thanks

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