Boost C++ Libraries: Ticket #9987: boost icl throws on gaps https://svn.boost.org/trac10/ticket/9987 <p> void overlap_counter() </p> <blockquote> <p> { </p> <blockquote> <p> typedef interval_map&lt;int, int&gt; OverlapCounterT; OverlapCounterT overlap_counter; discrete_interval&lt;int&gt; inter_val; </p> </blockquote> </blockquote> <blockquote> <blockquote> <p> int l<a class="changeset" href="https://svn.boost.org/trac10/changeset/10" title="*** empty log message *** ">[10]</a>={1,1,1}; int r<a class="changeset" href="https://svn.boost.org/trac10/changeset/10" title="*** empty log message *** ">[10]</a>={2,3,3}; for(int i = 0; i &lt; 3; i++){ </p> <blockquote> <p> inter_val = discrete_interval&lt;int&gt;::right_open(l[i],r[i]); overlap_counter += make_pair(inter_val, 1); </p> </blockquote> <p> } <em> get_insert prints: </em> <strong></strong><strong></strong>*[2,3) <em> <strong></strong><strong></strong>*[2,4) </em></p> </blockquote> </blockquote> <blockquote> <blockquote> <p> <em>Exceptions raised here. </em></p> </blockquote> </blockquote> <p> <em>Assertion failed: (this-&gt;_map.find(inter_val) == this-&gt;_map.end()), function gap_insert, file /Users/gagaga/boost155/include/boost/icl/interval_base_map.hpp, line 555. </em></p> <blockquote> <p> } </p> </blockquote> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9987 Trac 1.4.3 tvk.boost@… Fri, 23 May 2014 16:09:22 GMT <link>https://svn.boost.org/trac10/ticket/9987#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9987#comment:1</guid> <description> <p> I just encountered the same error in my own code when using interval_map and found this bug report. </p> <p> I can also reproduce the issue with the code posted above. I agree, this is indeed a showstopper. </p> <p> A temporary workaround seems to be to do .erase(inter_val) first, and then the .add() or += operation. </p> </description> <category>Ticket</category> </item> <item> <author>tvk.boost@…</author> <pubDate>Fri, 23 May 2014 16:14:01 GMT</pubDate> <title>cc set https://svn.boost.org/trac10/ticket/9987#comment:2 https://svn.boost.org/trac10/ticket/9987#comment:2 <ul> <li><strong>cc</strong> <span class="trac-author">tvk.boost@…</span> added </li> </ul> <p> FYI - I'm using libc++ with clang &amp; linux. </p> Ticket tvk.boost@… Wed, 18 Jun 2014 16:12:38 GMT <link>https://svn.boost.org/trac10/ticket/9987#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9987#comment:3</guid> <description> <p> In fact, this seems to be a duplicate of Bug 9501. See my comment there for an easy fix (add #define ICL_USE_BOOST_MOVE_IMPLEMENTATION before including ICL headers). </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Joachim Faulhaber</dc:creator> <pubDate>Tue, 01 Sep 2015 10:12:16 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/9987#comment:4 https://svn.boost.org/trac10/ticket/9987#comment:4 <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> Fixed with 1.56.0 </p> Ticket