
28 Mar
2011
28 Mar
'11
8:33 a.m.
On 26.03.2011 22:49, Soares Chen wrote:
One simple question to ask: May I know why is your class holding shared_ptr<basic_string<>> as the private member instead of simply basic_string<>? If I'm not wrong, basic_string<> is already a smart pointer to the underlying buffer and most implementation offers handy COW semantics.
On the contrary, the only CoW string I know is that from GCC's libstdc++, and that one will have to change: C++0x prohibits CoW implementations of std::basic_string.
Almost All implementations I know (but MSVC) use CoW strings, GCC, HP, SunCC and more. Shame on C++0x that CoW was removed for really irrelevant reasons. Artyom