[C++-sig] make_constructor issues
Ralf W. Grosse-Kunstleve
rwgk at yahoo.com
Sat Jul 24 01:20:13 CEST 2004
--- Stefan Seefeld <sseefeld at art.ca> wrote:
> > To me it seems the best implementation of the factory should return
> > auto_ptr<Foo> or shared_ptr<Foo> in order to avoid a copy.
>
> But copy-construct it must anyways, simply because I chose to export
> the type as class_<Foo>, not class_<Foo, shared_ptr<Foo> > !?!
Probably, but the point is that the current make_constructor implementation
covers the general case. Is it really worth the complication of implementing
another make_constructor overload? As shown in one of my previous messages you
can very easily modify your original factory function to fit into the current
system.
Ralf
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail
More information about the Cplusplus-sig
mailing list