Re: [Boost-bugs] [Boost C++ Libraries] #11801: Recursive modify in multi_index sometimes does not update index correctly

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11801: Recursive modify in multi_index sometimes does not update index correctly
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-11-19 18:33:11


#11801: Recursive modify in multi_index sometimes does not update index correctly
-------------------------------------+-------------------------------------
  Reporter: Valentyn Shtronda | Owner: joaquin
  <valiko.ua@…> | Status: closed
      Type: Bugs | Component: multi_index
 Milestone: To Be Determined | Severity: Problem
   Version: Boost 1.59.0 | Keywords: multi_index
Resolution: invalid | multi_index_container recursive
                                     | modify
-------------------------------------+-------------------------------------

Comment (by Valentyn Shtronda <valiko.ua@…>):

 I confirm, your suggestion works. Thanks!

 Please confirm that my understanding is correct: the problem occurs
 because during reindexing modify() assumes that only *it element is
 changed, so it does not perform full sort (for performance reasons). If
 I'm correct, I would mention this in the documentation of modify().

 Consider adding reindex() method so that the code was straightforward:
 {{{
 deps_map.reindex();
 }}}
 instead of
 {{{
 index_by_name.modify(it,[](node_info_t&){});
 }}}

 In documentation for this method you could describe in what case it must
 be called.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11801#comment:6>
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:19 UTC