
24 Oct
2005
24 Oct
'05
5:35 p.m.
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).
Right. make_optional(v) doesn't work because it can't tell whether we want a T or a T& optional_tie() would work but it requires the user to know wheter T or T& is needed. direct assignment is troublesome. So the only choices I see are: o.rebind(rb) or o = optional<T&>(rb). And I think I like the rebind() better. -- Fernando Cacciola SciSoft http://fcacciola.50webs.com/