From: Yuval Ronen (ronen_yuval_at_[hidden])
Date: 2005-10-25 12:12:47
Fernando Cacciola wrote:
> So you'd prefer:
> o = none
> Well, I guess that's depend on what with do with assigment.
> If there's only copy assignment, 'o = none' looks consistent.
> If there is rebind(), reset() looks consistent.
I humbly disagree. I think that if there's no direct assignment from T,
then there should also be no direct assignment from none (these two are
symmetric, as they are the two possible options for the optional's
content), and the only way to do it is by using reset()/clear(), or copy
assignment from an empty optional. If there is direct T assignment, on
the other hand, then none assignment should follow.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk