« Return to Thread: boost::factory?

Re: boost::factory?

by David Abrahams :: Rate this Message:

Reply to Author | View in Thread


on Sun Jun 17 2007, Tobias Schwinger <tschwinger-AT-isonews2.com> wrote:

> Dear Boost community,
>
> do we have a function object template to wrap arbitrary constructor
> calls / operator new expressions somewhere in Boost, already?
>
> If not, is there any interest in such a thing?
>
> Interface draft:
> ================
>
>      factory<T>     // constructs X and returns it by value
>      factory<T*>    // uses operator new, returns a pointer

auto_ptr, please.

>
>
> Where operator() takes a variable number of arguments, forwarded to the
> constructor.


Isn't in-place construction the most general case?

--
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

The Astoria Seminar ==> http://www.astoriaseminar.com

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

 « Return to Thread: boost::factory?