Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2007-06-18 13:28:31


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

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