Ticket #3668 (closed Bugs: fixed)
unordered_*::erase(iterator) should not return an iterator
|Reported by:||anonymous||Owned by:||igaztanaga|
and this thread
in that thread it is mentioned that boost.intrusive doesn't have that problem, but that was referring to boost 1.38, in which erase(iterator) had a void result.
boost.unordered can't simply change the return type since its specified in TR1, but I think boost.intrusive should.
as far as I know there is good solution to this except a void return type. changing the data structure to enable O(1) erase again creates memory overhead. evaluating the returned iterator only on demand, e.g. on indirection, makes all iterator operations more expensive.
here`s boost.intrusive's implementation that causes the problem: