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




_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to