20 Nov
2017
20 Nov
'17
2:03 a.m.
AMDG On 11/19/2017 04:41 PM, Peter Dimov via Boost wrote:
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()`.
Also, (ab)using operator* and operator-> like this isn't something new. optional is the same. In Christ, Steven Watanabe