----- Original Message ----- From: "Philippe A. Bouchard" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 24, 2003 4:29 PM Subject: [boost] Re: Re: Re: partial<> proposal
> David Abrahams wrote: > > [...] > > >> Example: > >> optional<int> i; > >> > >> new (i) int(17); > > > > Which copy ctor are you referring to? > > And why do we want to prevent copy ctor usages? > > Because optional<> will be able to handle types without copy constructors > (this was the main purpose of partial<> in fact). I was referring to the > copy constructor of optional<>'s template parameter. > 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? Fernando Cacciola _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost