std::string in a multi-threaded program

后端 未结 8 1822
北恋
北恋 2020-11-30 02:34

Given that:

1) The C++03 standard does not address the existence of threads in any way

2) The C++03 standard leaves it up to implementations to decide whethe

8条回答
  •  难免孤独
    2020-11-30 03:06

    In MSVC, std::string is no longer reference counted shared pointer to a container. They choose to the entire contents by-value in every copy constructor and assignment operator, to avoid multithreading problems.

提交回复
热议问题