Boost logo

Boost :

Subject: Re: [boost] [interest] rich-typed smart pointers
From: Larry Evans (cppljevans_at_[hidden])
Date: 2013-10-02 15:52:37


On 10/02/13 13:34, Julian Gonggrijp wrote:
> Dear Boost members,
>
> I have designed a smart pointer that relies on the type system to
> offer safe and flexible automatic memory management at no runtime
> cost. It combines single ownership as in std::unique_ptr and reliable
> access from multiple places as in std::shared_ptr with some additional
> features. I believe it to be about as safe and practically useful as a
> smart pointer in C++11 could get.
>
> Further explanation and a proof-of-concept implementation is available
> over here:
>
> https://github.com/jgonggrijp/rich-typed-pointers
>
> There is no license yet, but you have my explicit permission to try
> the library and the example programs at your own risk. :-)
>
[snip]
Reading:

   https://github.com/jgonggrijp/rich-typed-pointers

makes it sound useful, especially the section containing:

   Note that rich typed pointers can never be part of multiple
   ownership cycles at the same time. This is a true impossibility
   because at any time exactly one pointer will own a given object.

However, that statement seems to be contradicted by one just above it:

   Cyclic ownership using data_ptr and move is possible with some
   effort, but cannot happen by accident.

Could you please clarify?

-regards,
Larry


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk