It typically means a complete mapping copy every time the loop is run. Not something that always can be ignored, I think.
Yes, it'd be easy to do "foreach(m + (<>); int x;) ..." to get a copy-on-write when one want that.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-01-30 21:07: Subject: Multiset iterator
That's something of a bummer with the current mapping iterators, I think.
Why? It only happens at the first write, so it doesn't have that big effect, does it?
Anyway, I'd like them to have the same behaviour. And since it's easier to make a controlled copy (isn't it?) of the set you want to index over then continuously looping over inserted items, you're probably correct in that behaviour.
/ Mirar