[Development] Question about QCoreApplicationData::*_libpaths
kevin.kofler at chello.at
Sat Jan 23 00:12:30 CET 2016
Marc Mutz wrote:
> But again, CoW can be retrofitted onto any value type (e.g.
> shared_ptr<const T>), while CoW types will never be truly value types.
Again this nonsensical claim that shared_ptr is CoW. I already replied once
explaining that it is not. Or where do you see a copy on write being done?
shared_ptr does NOT detach. It is explicitly shared, you have to manually
deep-copy the contained T object if you need a deep copy. It does track an
atomic reference count, so it should be possible to implement CoW on top of
shared_ptr, but shared_ptr by itself is not CoW.
There is no CoW smart pointer in the STL.
More information about the Development