Is ostringstream thread safe

hi all,

I am wondering whether ostringstream is thread safe. I used ostingstrteam as below in a class.

static ostringstream oss;

If not thread safe, Is there any way to use oss as thread safe object.

Thanks in advance.
No. No part of the STL is thread-safe. (No object in general is thread-safe.)
You will have to use the usual locking mechanisms before handling any object.

When playing with streams, I would think that would be a given, since synchronization is an issue.

Hope this helps.
Topic archived. No new replies allowed.