[Boost-bugs] [Boost C++ Libraries] #3288: Mismatching return types in intrusive::unordered_set and underlying hashtable_impl erase_and_dispose

Subject: [Boost-bugs] [Boost C++ Libraries] #3288: Mismatching return types in intrusive::unordered_set and underlying hashtable_impl erase_and_dispose
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-07-24 14:53:20


#3288: Mismatching return types in intrusive::unordered_set and underlying
hashtable_impl erase_and_dispose
--------------------------------------------+-------------------------------
 Reporter: florian.baumert@… | Owner: igaztanaga
     Type: Bugs | Status: new
Milestone: | Component: intrusive
  Version: Boost 1.39.0 | Severity: Problem
 Keywords: |
--------------------------------------------+-------------------------------
 In intrusive::unordered_set, it is defined as:

 {{{
 462 template<class Disposer>
 463 iterator erase_and_dispose(const_iterator i, Disposer disposer)
 464 { return table_.erase_and_dispose(i, disposer); }
 465
 466 #if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
 467 template<class Disposer>
 468 iterator erase_and_dispose(iterator i, Disposer disposer)
 469 { return this->erase_and_dispose(const_iterator(i), disposer);
 }
 470 #endif
 }}}

 whereas hashtable_impl defines the same functions (calles by
 unordered_set) as

 {{{
 1299 template<class Disposer>
 1300 void erase_and_dispose(const_iterator i, Disposer disposer)
 1301 {
 1302 priv_erase(i, disposer, optimize_multikey_t());
 1303 this->priv_size_traits().decrement();
 1304 priv_erasure_update_cache();
 1305 }
 1306
 1307 #if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
 1308 template<class Disposer>
 1309 iterator erase_and_dispose(iterator i, Disposer disposer)
 1310 { return this->erase_and_dispose(const_iterator(i), disposer);
 }
 1311 #endif
 }}}

 If you call erase_and_dispose with a const_iterator, the compiler has a
 point in saying that he can not convert void to iterator.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3288>
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:00 UTC