From: Fernando Cacciola (fernando_cacciola_at_[hidden])
Date: 2003-10-30 16:09:08
"Brian McNamara" <lorgon_at_[hidden]> escribió en el mensaje
> Similar to recent variant discussions, (like Dave just did) I want to
> offer the (same) advice that, without actual use cases from practical
> experience, we should not be too confident/final with respect to results
> from this discussion.
> That said...
> On Thu, Oct 30, 2003 at 04:41:54PM -0300, Fernando Cacciola wrote:
> > int a = 1 ;
> > optional<int&> opt(a) ;
> > Ideally, initialized optional references should behave just like true
> > references, thus, assignment should not rebind the reference to a
> > object but assign right into the referenced object:
> > int b = 2 ;
> > opt = b ;
> > assert( a == b) ;
> I don't agree that this is "ideal"; I'll argue why shorty.
ah, another option is to just leave things as they are now.
I understand you arguments. of course, since this is what I originally
Joel asked me to change it because he had a use case in Spirit, and it
looked right to me.
Now that I have both opposite opinions I'm totally messed up :-)
As you say, we'll need many use cases to see which way is more sound.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk