
"Fernando Cacciola" <fernando_cacciola@hotmail.com> writes:
Specifically... wouldn't you find odd that the result of assignment depends on whether the lvalue was previously absent or not? Don't you agree that _most_ people would call _that_ counterintuitive?
That's what optional now does for non-reference types! If you're going to use assignment for the underlying type in optional<X>, then a special case for references that rebinds the reference seems wrong. OTOH, if you think that rebinding the reference is the right thing to do, then it is inconsistent to use assignment for non-reference types; these should be "rebound", too --- the old object destroyed, and a new one created. Special cases are awkward. Anthony -- Anthony Williams Software Developer Just Software Solutions Ltd http://www.justsoftwaresolutions.co.uk