Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-01-31 15:44:37


Greg Colvin <Gregory.Colvin_at_[hidden]> writes:

> At 10:48 AM 1/31/2003, David Abrahams wrote:
>>Greg Colvin <Gregory.Colvin_at_[hidden]> writes:
>>
>>> At 09:53 AM 1/31/2003, David Abrahams wrote:
>>>>...
>>>>In fact, I have been arguing for years that our smart pointers should
>>>>never have had a public interface which adopts unmanaged resources on
>>>>construction. Instead, we should write:
>>>>
>>>> std::auto_ptr<T> = std::auto_ptr_new<T>(arg1, arg2, arg3);
>>>>
>>>>Voila, a managed T straight out of the box.
>>>
>>> And I proposed something like this years before that, but
>>> foundered on not being able to declare a type-safe variadic
>>> function in C++.
>>
>>The move/forwarding proposals will fix that. In the meantime we have
>>boost::ref(x)... ugly but effective.
>
> Can you give us link to that proposal?

You can find it in
http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/mailings/papers/2002/pre_santacruz.zip

Sorry, it's not truly varadic, it's "up to N args."

-- 
                       David Abrahams
   dave_at_[hidden] * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution

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