Is it safe to use C++ STL containers on multiple threads if no insertions and only .find()?
In C++, is it safe to use an std::map or std::vector concurrently in different threads if you are NOT inserting, just doing .find() operations on开发者_高级运维 it?
The current C++ Standard has nothing to say on the subject of threading, and so does not address this issue. The documentation for your specific C++ Standard Library implementation should cover it, however.
This is implementation specific and not guaranteed by the standard.
Yes. No memory changes or caching are going to happen under the hood.
精彩评论