As an example, consider a std::map implemented with a Splay tree. This kind of tree structure is mutable and changes every time the map is accessed for reading. When the map is const, who must garantuee the isolation of concurrent readings, is it up to the user code or to the map implementation?
Share
The questioner knows that if you have threads that write to a collection, the user must manage the synchronised locking.
The question seems to be whether the standard can guarantee thread-safety if simulataneous threads are only reading the collection.
I am not sure that the old C++ standards had any guarantees of thread-safety with any operations at all, but the new one will (section has been given in comments, 23.2.2). As it is, most vendors now do guarantee thread-safety amongst concurrent reads, notwithstanding the fact that the concurrency within the objects contained in the collection obviously need to be handled by the user.
In the same way, you would be able to use read-write locks on an STL collection.
These are related question on stack overflow:
Thread safety of std::map for read-only operations
Is the C++ std::set thread-safe?