In a 2008 publication on his website, Herb Sutter states the following:
There is an active suggestion for further tightening this in C ++ 0x and requires rejection of the zero sequence and, possibly, the prohibition of copy-to-write implementation, for concurrency reasons. Heres the paper: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2534.html . I think that one or both proposals in this document are likely to be accepted, but it is clearly visible at the next or two meetings.
I know that C ++ 11 now guarantees that the contents of std :: string will be stored contiguously, but did they apply the above in the final project?
Is it now safe to use something like &str[0] ?
c ++ string language-lawyer c ++ 11 null-terminated
links77 May 20 '11 at 20:20 2011-05-20 20:20
source share