Container insertion and removal
Steve Teale
steve.teale at britseyeview.com
Sat Mar 6 09:03:20 PST 2010
>> Sounds good?
>
> How can softRemove not affect iterating ranges? What if the range is
> positioned on the element removed?
>
> The only two containers that would support softInsert would be linked
> list and sorted map/set. Anything else might completely screw up the
> iteration. I don't see a lot of "generic" use for it.
>
> Another option is to use a "mutation" field that is checked every chance
> by the range. If it changes, then the range is invalidated.
>
> -Steve
Steve,
Wouldn't the soft things throw (or maybe just nudge) an exception if the
container was in a state where the soft option was not appropriate.
That would be the other way round to what you said, The container would
note when some range operation had a conflicting currency.
Steve
More information about the Digitalmars-d
mailing list