Boost C++ Libraries: Ticket #3288: Mismatching return types in intrusive::unordered_set and underlying hashtable_impl erase_and_dispose https://svn.boost.org/trac10/ticket/3288 <p> In intrusive::unordered_set, it is defined as: </p> <pre class="wiki">462 template&lt;class Disposer&gt; 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&lt;class Disposer&gt; 468 iterator erase_and_dispose(iterator i, Disposer disposer) 469 { return this-&gt;erase_and_dispose(const_iterator(i), disposer); } 470 #endif </pre><p> whereas hashtable_impl defines the same functions (calles by unordered_set) as </p> <pre class="wiki">1299 template&lt;class Disposer&gt; 1300 void erase_and_dispose(const_iterator i, Disposer disposer) 1301 { 1302 priv_erase(i, disposer, optimize_multikey_t()); 1303 this-&gt;priv_size_traits().decrement(); 1304 priv_erasure_update_cache(); 1305 } 1306 1307 #if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) 1308 template&lt;class Disposer&gt; 1309 iterator erase_and_dispose(iterator i, Disposer disposer) 1310 { return this-&gt;erase_and_dispose(const_iterator(i), disposer); } 1311 #endif </pre><p> 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. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3288 Trac 1.4.3 Ion Gaztañaga Thu, 26 Aug 2010 11:03:03 GMT status changed; resolution, milestone set https://svn.boost.org/trac10/ticket/3288#comment:1 https://svn.boost.org/trac10/ticket/3288#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> <li><strong>milestone</strong> → <span class="trac-field-new">Boost-1.45.0</span> </li> </ul> <p> Fixed for Boost 1.45 in release branch </p> Ticket