$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
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.