🔒 Locked
std::string
Advertisement
Original Post
Bah, those don't count as C++ compilers anyways ;-).
That said, the proper alternative to std::string in such a situation would be your own string class (or downloading a replacement standard library - doesn't STLport work on VS6?). While std::string + multithreading = problems in a few ancient compilers I wouldn't be caught dead using anyways, "c style" char*s = problems anywhere, and everywhere if used directly.
That said, the proper alternative to std::string in such a situation would be your own string class (or downloading a replacement standard library - doesn't STLport work on VS6?). While std::string + multithreading = problems in a few ancient compilers I wouldn't be caught dead using anyways, "c style" char*s = problems anywhere, and everywhere if used directly.
Quote:
Original post by Zao
What you should use is a suitable synchronization primitive to serialize usage of the resource, instead of blindly hoping things will work.
Which would be much better advice if you mentioned how to properly synchronize multiple instances of a string object if they used a COW implementation. Entangled state makes this a less straightforward operation than you imply.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement