Boost logo

Boost :

Subject: Re: [boost] [ValueRef] Interest in a new library for immutable values with internal sharing?
From: THOMAS JORDAN (tomjordan766_at_[hidden])
Date: 2015-04-21 09:54:16


> Message: 2
> Date: Tue, 21 Apr 2015 10:33:26 +0100
> From: Sam Kellett <samkellett_at_[hidden]>
> To: boost_at_[hidden]
> Subject: Re: [boost] [ValueRef] Interest in a new library for
> immutable values with internal sharing?
> Message-ID:
> <CAHK+-Fu6aYO2UwNkSvJWpn6UzmLjr+qNu+K3x8OSto8dyYGSBA_at_[hidden]
>
> Content-Type: text/plain; charset=UTF-8

> On 20 April 2015 at 18:07, Thomas Jordan <tomjordan766_at_[hidden]> wrote:

> > ValueRef doesn't expose (shared) pointers/pointees, they are a hidden,
> > implementation detail. Its interface just deals in values (as shown in
the
> > example usage).

> Absolutely! Hence the ref in the name. :)

> I kept the pointer as part of the interface seeing as I saw it as a smart
> pointer to replace another smart pointer, but either direction is not
wrong
> for sure.

> The thing I like about the schrodinger_ptr is that I can carry on mutating
> it while nobody else is looking, it seems with yours you would have to add
> all data to it on it's construction, is that right?

Yes, it is an immutable value with sharing of the underlying value object,
that is pretty much the gist of it


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