It had been my understanding that copy-on-write is not a viable way to implement a conforming std::string in C++11, but when it came up in discussion recently I
From 21.4.2 basic_string constructors and assignment operators [string.cons]
basic_string(const basic_string& str); [...]
2 Effects: Constructs an object of class
basic_stringas indicated in Table 64. [...]
Table 64 helpfully documents that after construction of an object via this (copy) constructor, this->data() has as value:
points at the first element of an allocated copy of the array whose first element is pointed at by str.data()
There are similar requirements for other similar constructors.