Hi,

Just for clarifying what I mean by "smart iterator": a smart iterator would be a iterator that acquires/releases locks on container/container items.

If we would consider a Reader/Writer paradigm - few writtings and many readings, then a const_iterator would acquire/release a read lock on container and read lock on item, and a iterator would acquire/release a read lock on container and a write lock on item.

For writting operations on container (e.g insert, remove), we would acquire write lock on container.
Of course, we would consider a container stability, if stable (e.g. std::list, std::map) or unstable( e.g. std::vector, std::deque) in order to optimizing the solution (stable containers would allow simultaneous read/write operations on container).

obs:Maybe the paradigm of concurrency could be a parameter.

There is an analogous iterator in boost ?


Thanks.
Eduardo Panisset