Boost logo

Boost :

Subject: Re: [boost] Adding polymorphic_value to boost
From: Peter Dimov (lists_at_[hidden])
Date: 2017-11-19 23:41:10


Peter Bartlett wrote:

> The only nit I had in the paper was that after all the banging on about it
> being a value type, we are given operator bool, operator* and operator->,
> making it pointer-like again. Could operator T& and operator T const&
> work?

Polymorphic means virtual functions, and when you have a
polymorphic_value<T> pv, where T has a virtual function `f`, you can call
`pv->f()`. With a conversion to T&, you can't call `pv.f()`.


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