In general I assume that streams are not synchronized, it is up to the user to do appropriate locking. However, do things like cout
get special treatment in the
The C++ Standard does not specify whether writing to streams is thread-safe, but usually it's not.
www.techrepublic.com/article/use-stl-streams-for-easy-c-plus-plus-thread-safe-logging
and also: Are standard output streams in C++ thread-safe (cout, cerr, clog)?
UPDATE
Please have a look at @Martinho Fernandes' answer to know about what the new standard C++11 tells about this.