Containers
deadalnix
deadalnix at gmail.com
Wed Sep 1 20:51:39 UTC 2021
On Wednesday, 1 September 2021 at 20:48:10 UTC, Per Nordlöw wrote:
> On Wednesday, 1 September 2021 at 00:52:04 UTC, deadalnix wrote:
>> You seem to be confused. The C++11 standard prohibits
>> std::string from using COW. Existing C++ implementations were
>> using COW, and getting out of it was what was a disaster
>> (notably, there were breaking ABI changes, which the C++
>> ecosystem is not well suited to handle).
>
> In what ways was it a disaster? Because most strings are small
> enough to benefit from the small string optimization?
It was a disaster because gcc's standard lib used a COW string
implementation, but had to change it when moving the C++11.
Considering virutally everything uses string and that a lot of
C++ software is distributed in binary format, and that the
standard lib is often liked in live at launch time by the OS, you
are faced with an ABI breakage nightmare.
More information about the Digitalmars-d
mailing list