From: David Abrahams (dave_at_[hidden])
Date: 2005-10-24 13:22:29
"Fernando Cacciola" <fernando_cacciola_at_[hidden]> writes:
> Rob Stewart wrote:
>> Yes, an interface for non-assignable types that doesn't requiring
>> parameterizing optional would be good. IOW, o.rebind(rb) rather
>> than o = optional<T&>(rb).
> make_optional(v) doesn't work because it can't tell whether we want a T or a
> optional_tie() would work but it requires the user to know wheter T or T& is
> direct assignment is troublesome.
> So the only choices I see are:
> o = optional<T&>(rb).
> And I think I like the rebind() better.
I like the latter. The name "rebind" doesn't make much sense for
optional<T> where T is not a reference.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk