• Dominik Charousset's avatar
    Give COW pointer const-by-default semantics · aee597a7
    Dominik Charousset authored
    The current design of intrusive_cow_ptr with const-overloaded member
    functions makes it very easy to accidentially create copies. Further,
    `intrusive_cow_ptr` does no longer work with forward-declared types,
    since it calls T::copy. The new design adds `intrusive_cow_ptr_unshare`
    as a customization point to work with forward-declared types, adds
    `make_copy_on_write` as complement to `make_shared`, and requires users
    to explicitly call `unshared()` or `unshared_ptr()` to get mutable
    access to the managed object.
    aee597a7
message.hpp 13.4 KB