I'd also like to point out that your approach via modify_unstable_range as per the boost mailing list works correctly though (however you've commented that it would be a slower approach) On Fri, Jan 1, 2016 at 1:03 AM Joaquín M Lopez Munoz <joaquin@tid.es> wrote:
Amit Prakash Ambasta <amit.prakash.ambasta <at> gmail.com> writes:
std::pair<index::iterator, index::iterator> iter =
index.equal_range(value);
while(iter.first != iter.second) {
index.modify( iter.first, [](T& element) { ... } );
iter.first++; }
leads to segfaults and unexpected behavior.
What would be right way to approach this?
This is a classic, please follow these links for further info:
http://stackoverflow.com/questions/29013600/
modifying-key-ranges-in-a-boost-multi-index-map-having-hashed-non-unique-keys http://lists.boost.org/boost-users/2006/03/18048.php
Joaquín M López Munoz Telefónica _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users