From: Rob Stewart (stewart_at_[hidden])
Date: 2005-10-21 14:57:22
From: "Fernando Cacciola" <fernando_cacciola_at_[hidden]>
> Rob Stewart wrote:
> > First, I'll describe what I think the right behavior is; this may
> > be exactly how optional works now or it may not be. I haven't
> > compared this description to optional's documentation.
> OK. You just described Joel's proposed behaviour, and, from your test
> results, it's clear that at least you wouldn't be confused about the fact
> that in one case it binds while in the other it doesn't.
> Now I wonder how would that be in real code... I mean, in my example you
> could infer from the context that 'o' was null in one of the cases... but
> what if you can't tell that? you wouldn't be able from context alone to know
> the expected effect of assignment. That's real problem don't you agree?
I agree that's a real problem and even more so in generic code
that might try to work with any OptionalPointee.
-- Rob Stewart stewart_at_[hidden] Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk