Boost logo

Boost :

Subject: Re: [boost] Adding polymorphic_value to boost
From: Jonathan Coe (jonathanbcoe_at_[hidden])
Date: 2017-11-21 19:08:39

> On 21 Nov 2017, at 17:30, Seth via Boost <boost_at_[hidden]> wrote:
>> On 21-11-17 09:45, Jonathan Coe via Boost wrote:
>> Do you have sample code you might be able to share to illustrate this
>> point: "Sometimes (in a comms-based system, often) even though the handle
>> object's
>> interface is const, and accessor will do some internal work which may
>> need to mutate the implementation (even on another thread)." I'm afraid
>> this example is sufficiently removed from my day-to-day experience that I
>> struggle to see what you mean without code.
> I'm not sure, but I'm seeing `handle` as something completely different,
> unrelated to `polymorphic_value`.
> The implementation of a handle's body could benefit a lot from
> `polymorphic_value`, but
> - in my mind a `polymorphic_value` has - by definition - value
> semantics, and a such _requires_ const-propagation always (because
> that's consistent witht he core language value semantics).
> - likewise, the const-ness of a handle never propagates to it's body
> Different patterns, different semantics, different type, I think
> Cheers,
> Seth
> _______________________________________________
> Unsubscribe & other changes:

I would agree that polymorphic_value and cloned_ptr solve different problems. My proposed addition to boost is polymorphic_value, I could possibly be convinced to propose cloned_ptr too.



Boost list run by bdawes at, gregod at, cpdaniel at, john at