Boost C++ Libraries: Ticket #9665: multiIndex hashed_non_unique insert(first, last) compile error https://svn.boost.org/trac10/ticket/9665 <p> Hello, </p> <p> I have a multiIndex map with one index, a hashed_non_unique. If I do an insert with a range where the iterator does not yield a reference, it will not compile. The insert function calls the final_insert_ref_, which accepts a reference. </p> <hr /> <pre class="wiki"> typedef boost::adjacency_list&lt;boost::vecS, boost::vecS&gt; graph; typedef boost::graph_traits&lt;graph&gt;::vertex_descriptor vertex_descriptor; typedef boost::multi_index_container&lt; vertex_descriptor, boost::multi_index::indexed_by&lt; boost::multi_index::hashed_non_unique&lt;boost::multi_index::identity&lt;vertex_descriptor&gt; &gt; &gt; &gt; container; container c; graph g; c.insert(boost::vertices(g).first, boost::vertices(g).second); </pre><p> Gives the following error: </p> <pre class="wiki">/usr/include/boost/multi_index/hashed_index.hpp:320: error: no matching function for call to 'boost::multi_index::detail::hashed_index&lt;boost::multi_index::identity&lt;long unsigned int&gt;, boost::hash&lt;long unsigned int&gt;, std::equal_to&lt;long unsigned int&gt;, boost::multi_index::detail::nth_layer&lt;1, long unsigned int, boost::multi_index::indexed_by&lt;boost::multi_index::hashed_non_unique&lt;boost::multi_index::identity&lt;long unsigned int&gt; &gt; &gt;, std::allocator&lt;long unsigned int&gt; &gt;, boost::mpl::vector0&lt;mpl_::na&gt;, boost::multi_index::detail::hashed_non_unique_tag&gt;::final_insert_ref_(boost::iterator_facade&lt;boost::range_detail::integer_iterator&lt;long unsigned int&gt;, long unsigned int, boost::random_access_traversal_tag, long unsigned int, long int&gt;::reference)' for(;first!=last;++first)this-&gt;final_insert_ref_(*first); ^ </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9665 Trac 1.4.3 Joaquín M López Muñoz Thu, 13 Feb 2014 19:10:22 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/9665#comment:1 https://svn.boost.org/trac10/ticket/9665#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> </ul> <p> Hi Thomas, </p> <p> Thanks for spooting this bug, fixed at </p> <p> <a class="ext-link" href="https://github.com/boostorg/multi_index/commit/26d215e0637e30fac8bde92e3971259ac594c85f"><span class="icon">​</span>https://github.com/boostorg/multi_index/commit/26d215e0637e30fac8bde92e3971259ac594c85f</a> </p> <p> I'd appreciate if you could verify this works on your side. </p> Ticket