[Boost-bugs] [Boost C++ Libraries] #9665: multiIndex hashed_non_unique insert(first, last) compile error

Subject: [Boost-bugs] [Boost C++ Libraries] #9665: multiIndex hashed_non_unique insert(first, last) compile error
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-02-13 09:40:02


#9665: multiIndex hashed_non_unique insert(first, last) compile error
------------------------------+-------------------------
 Reporter: thomasfannes@… | Owner: joaquin
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: multi_index
  Version: Boost 1.55.0 | Severity: Problem
 Keywords: |
------------------------------+-------------------------
 Hello,

 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.



 ----


 {{{
     typedef boost::adjacency_list<boost::vecS, boost::vecS> graph;
     typedef boost::graph_traits<graph>::vertex_descriptor
 vertex_descriptor;
     typedef boost::multi_index_container<
             vertex_descriptor,
             boost::multi_index::indexed_by<
 boost::multi_index::hashed_non_unique<boost::multi_index::identity<vertex_descriptor>
>
>
> container;

     container c;
     graph g;
     c.insert(boost::vertices(g).first, boost::vertices(g).second);
 }}}

 Gives the following error:


 {{{
 /usr/include/boost/multi_index/hashed_index.hpp:320: error: no matching
 function for call to
 'boost::multi_index::detail::hashed_index<boost::multi_index::identity<long
 unsigned int>, boost::hash<long unsigned int>, std::equal_to<long unsigned
 int>, boost::multi_index::detail::nth_layer<1, long unsigned int,
 boost::multi_index::indexed_by<boost::multi_index::hashed_non_unique<boost::multi_index::identity<long
 unsigned int> > >, std::allocator<long unsigned int> >,
 boost::mpl::vector0<mpl_::na>,
 boost::multi_index::detail::hashed_non_unique_tag>::final_insert_ref_(boost::iterator_facade<boost::range_detail::integer_iterator<long
 unsigned int>, long unsigned int, boost::random_access_traversal_tag, long
 unsigned int, long int>::reference)'
      for(;first!=last;++first)this->final_insert_ref_(*first);
                               ^
 }}}

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