std::string in a multi-threaded program

后端 未结 8 1819
北恋
北恋 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:03

    Given that the standard doesn't say a word about memory models and is completely thread unaware, I'd say you can't definitely assume every implementation will be non-cow so no, you can't

    Apart from that, if you know your tools, most of the implementations will use non-cow strings to allow multi-threading.

提交回复
热议问题