From: "Iain K.Hanson" <[EMAIL PROTECTED]>
>
> :-) 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.)

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to