|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-12-12 12:09:11
From: "Iain K.Hanson" <iain.hanson_at_[hidden]>
>
> :-) true. But it also does not have container semantics either.
> I prefered your analogy with a special valued INT. Given that we
> have
> *opt1 == *opt2
> for ordinary value comparisons
But this doesn't work when one of the optionals is uninitialized. opt1 ==
opt2 (as proposed) is a safer version of the above, as its behavior is
always defined. It also has the desirable property
optional b(a);
assert(b == a);
for any a (i.e. it represents "equivalent to" as used by CopyConstructible
and Assignable.)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk