From: Fernando Cacciola (fernando_cacciola_at_[hidden])
Date: 2005-10-13 11:49:53
Anthony Williams wrote:
> "Fernando Cacciola" <fernando_cacciola_at_[hidden]> 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!
Well, using your analogy below for non-reference types, yes, you're right.
Well, finally something that can help me weight the models.
> 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.
Yes, special cases are awkard.. That's always the case and I always agreed
What is interesting of your post is that you have shown that this is indeed
a special case since assignment of non-reference types does depend on the
lvalue being absent or not. Is just that for non reference types, the
difference is mot while for reference types is very important.
Please, wait for my post on c.s.cpp so we can continue there.
-- Fernando Cacciola SciSoft http://fcacciola.50webs.com/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk