Subject: Re: [boost] [optional] layout
From: Stefan Strasser (strasser_at_[hidden])
Date: 2009-10-28 12:30:07
Am Wednesday 28 October 2009 15:31:55 schrieb Gottlob Frege:
> On Tue, Oct 27, 2009 at 7:13 PM, Domagoj Saric <dsaritz_at_[hidden]> wrote:
> > ...because that is what i was whishing for to be extracted from
> > optional<> - the placement new/in-place construction + aligned storage +
> > reference workarounds&co. wrapped up machinery...
> > ...for example:
> > 1....
> > 2....
> > 3....
> 4. An in-place fast pimpl. see Herb Sutter's
> http://www.gotw.ca/gotw/028.htm for why not to do this.
that is not the same thing as gottlob was proposing. boost::optional<> doesn't
have the problems herb sutter lists, and a type that is only used for in
place construction, without optional's conditional bool, wouldn't either.
I've been missing such a type, too, but I think it should be part of the boost
in place utility instead of boost::optional:
see "container-side usage" there.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk