Boost logo

Boost :

Subject: Re: [boost] [optional] layout
From: Domagoj Saric (dsaritz_at_[hidden])
Date: 2009-10-27 19:32:52


"Steven Watanabe" <watanabesj_at_[hidden]> wrote in message
news:4AC4EDDE.5070606_at_providere-consulting.com...
>> it also makes life harder for those of us keen to hackery ;) because it
>> makes the address of an optional different from the address of the actual
>> object within the optional...
>>
>
> Um, you shouldn't rely on this anyway. The standard only
> makes guarantees about the addresses of sub-objects for
> POD types.

and, if i'm not mistaken, for class sub-objects that belong to the same "access
section"...although, yes, the point is still moot from a standard-pure POV as
boost::optional<> is free to use base classes for implementation and it in fact
does...

-- 
 "That men do not learn very much from the lessons of history is the most
important of all the lessons of history."
 Aldous Huxley 

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