Boost logo

Boost :

From: Philippe A. Bouchard (philippeb_at_[hidden])
Date: 2003-02-24 16:21:30


Fernando Cacciola (Home) wrote:

[...]

> I'm still not sure I understand what are you trying to do, but it
> looks
> like you want optional with in-place construction (which bypasses the
> copy). In this case, I recently explored something which would look
> like:
>
> optional<Window> opt( in_place<Window>(point(0,0),point(10,10)));
>
> here, in_place() is used to forward T's ctor argument to optional<>
> so that
> T is effectively constructed in-place right within the aligned
> storage.
>
> Is this what you want?

Yes, something like that. I am curious to know how in_place<> works.

Philippe A. Bouchard


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