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 standard library?
That is, if multiple threads are writing to cout can they corrupt the cout object? I understand that even if synchronized you'd still get randomly interleaved output, but is that interleaving guaranteed. That is, is it safe to use cout from multiple threads?
Is this vendor dependent? What does gcc do?
Important: Please provide some kind of reference for your answer if you say "yes" since I need some kind of proof of this.
My concern is also not about the underlying system calls, those are fine, but the streams add a layer of buffering on top.