Boost C++ Libraries: Ticket #2042: map insert does not work after an erase in the non-typeof implementation https://svn.boost.org/trac10/ticket/2042 <p> This test case fails. </p> <pre class="wiki"> #include &lt;boost/mpl/map.hpp&gt; #include &lt;boost/mpl/assert.hpp&gt; #include &lt;boost/mpl/insert.hpp&gt; #include &lt;boost/mpl/pair.hpp&gt; #include &lt;boost/mpl/erase_key.hpp&gt; #include &lt;boost/mpl/at.hpp&gt; #include &lt;boost/type_traits/is_same.hpp&gt; using namespace boost::mpl; typedef erase_key&lt; insert&lt; insert&lt;map0&lt;&gt;, pair&lt;char, double&gt; &gt;::type, pair&lt;int, float&gt; &gt;::type, char &gt;::type int_to_float_map; typedef insert&lt;int_to_float_map, pair&lt;char, long&gt; &gt;::type with_char_too; BOOST_MPL_ASSERT((boost::is_same&lt;at&lt;with_char_too, char&gt;::type, long&gt;)); </pre><p> The attached patch fixes the problem. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2042 Trac 1.4.3 Steven Watanabe Tue, 24 Jun 2008 03:25:55 GMT attachment set https://svn.boost.org/trac10/ticket/2042 https://svn.boost.org/trac10/ticket/2042 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">insert_impl.hpp.patch</span> </li> </ul> Ticket Steven Watanabe Tue, 24 Jun 2008 03:26:55 GMT component changed; owner set https://svn.boost.org/trac10/ticket/2042#comment:1 https://svn.boost.org/trac10/ticket/2042#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Aleksey Gurtovoy</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">mpl</span> </li> </ul> Ticket Steven Watanabe Sun, 23 Aug 2009 04:42:27 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/2042#comment:2 https://svn.boost.org/trac10/ticket/2042#comment:2 <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> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/55727" title="Use order instead of size to find the next order in the non-typeof ...">[55727]</a>) Use order instead of size to find the next order in the non-typeof implementation of mpl::insert for mpl::map. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2042" title="#2042: Bugs: map insert does not work after an erase in the non-typeof implementation (closed: fixed)">#2042</a>. </p> Ticket Aleksey Gurtovoy Mon, 24 Aug 2009 04:18:07 GMT milestone changed https://svn.boost.org/trac10/ticket/2042#comment:3 https://svn.boost.org/trac10/ticket/2042#comment:3 <ul> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.36.0</span> → <span class="trac-field-new">Boost 1.40.0</span> </li> </ul> Ticket