Boost logo

Boost :

Subject: Re: [boost] Adding polymorphic_value to boost
From: Seth (bugs_at_[hidden])
Date: 2017-11-21 17:30:06


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


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