|
Boost : |
From: Iain K.Hanson (iain.hanson_at_[hidden])
Date: 2002-12-12 11:50:04
> [mailto:boost-bounces_at_[hidden]]On Behalf Of Peter Dimov
> Optional does not have pointer semantics. Two optionals can
> never alias each
> other. "Consistent with pointer semantics" doesn't make
> sense. Optional is
> not a pointer. Don't try to make it into one; you'll arrive
> at shared_ptr.
> ;-)
:-) 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 then
opt1 == opt2
is purely a test of the two optional's state.
/ikh
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk