|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-12-12 16:24:49
From: "Fernando Cacciola" <fernando_cacciola_at_[hidden]>
> > optional<T> m(t);
> >
> > > foo(m, m); // comparison inside yields false
where foo is
void foo(optional<T> const &, optional<T> const &);
> > >
> Nop... :-)
>
> it compares true because get_pointer(x)==get_poiner(x) is true for any x,
> whether initialized or not.
True. Had foo been
void foo(optional<T>, optional<T>);
or had the call been
foo(optional<T>(t), optional<T>(t)); // corresponds to foo(&t, &t)
I would have been right.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk