Boost logo

Boost :

From: Fernando Cacciola (fernando_cacciola_at_[hidden])
Date: 2002-12-12 16:12:22


----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>
To: "Boost mailing list" <boost_at_[hidden]>
Sent: Thursday, December 12, 2002 5:35 PM
Subject: Re: [boost] Formal review: Optional library

> From: "Peter Dimov" <pdimov_at_[hidden]>
>
> Oops,
>
> > Yes it will. :-)
> >
> > optional<T> m;
>
> should have been
>
> optional<T> m(t);
>
> > foo(m, m); // comparison inside yields false
> >
Nop... :-)

it compares true because get_pointer(x)==get_poiner(x) is true for any x,
whether initialized or not.

In fact, this is the very reason why I choosen this definition. It matches
pointer aliasing.

Fernando Cacciola


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk