[Boost-bugs] [Boost C++ Libraries] #3668: unordered_*::erase(iterator) should not return an iterator

Subject: [Boost-bugs] [Boost C++ Libraries] #3668: unordered_*::erase(iterator) should not return an iterator
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-11-24 20:12:30


#3668: unordered_*::erase(iterator) should not return an iterator
--------------------------+-------------------------------------------------
 Reporter: anonymous | Owner: igaztanaga
     Type: Bugs | Status: new
Milestone: Boost 1.42.0 | Component: intrusive
  Version: Boost 1.41.0 | Severity: Regression
 Keywords: |
--------------------------+-------------------------------------------------
 please see

 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2023.pdf

 and this thread

 http://lists.boost.org/Archives/boost/2009/11/159116.php

 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:

 http://lists.boost.org/Archives/boost/2009/11/159134.php

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3668>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:01 UTC