
----- Mensaje original -----
De: Jeff Flinn
Joaquín Mª López Muñoz wrote:
So wouldn't the only use of modify_unstable_range be for modifying keys and indirect members? So only a single modify_unstable_range calling .modify_key would suffice? Just thinking out loud here, until I have access to the docs.
I'm not sure I'm making my point. There are two orthogonal issues to consider here: 1 Whether you are modyfing whole elements (A) or keys (B). 2 Whether the modification is "stable" (1) or not (2). The four combinations are actual possibilities: A1: modify_range A2: modify_unstable_range B1: modify_key_range B2: modify_key_unstable_range where B1 and B2 (which are not given in my previous snippet) are written exactly as A1 and A2, respectively, except that where it read .modify(...) you've got to write .modify_key(...). "Stability" is not dependant on whether you're modifying elements or keys: you can get stable and unstable range modifications both ways. What defines a stable range modification of the form modify[_key]_range(i,first,last,mod) is that, after modifying an element pointed to by iterator it, the resulting repositioning does not lie inside [++it,last), i.e. we're sure we won't visit the element again. You can see in my previous snippets examples of stable and unstable range modifications.
Thanks for your library and your help. :)
Jeff
You're welcome, thank you for using the Boost.MultiIndex. Joaquín M López Muñoz Telefónica, Inevstigación y Desarrollo _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users