Hi,
I am trying to modify members of all elements matching value for a given index in a boost.multiindex container
index.modify(
index.find(value),
[](T& element) { ... }
)
seems to update a singular element(first match)
On the other hand,
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?