Boost logo

Boost :

From: jk_at_[hidden]
Date: 2001-04-04 23:09:13


5 Apr 2001 04:38:59 +0400 David Abrahams wrote:
>numbers of arguments. The kind of templates needed to do complete function
>argument deduction are one example. Another example is the that of
>"forwarding constructors" for such things as smart pointers (i.e. imagine
>you could construct auto_ptr<T> with the arguments that get passed to any of
>T's constructors, thereby building the referent). I had to use these all

Do you mean this:

        boost::shared_ptr<foo> bar(x, 1, "buz");

instead of

        boost::shared_ptr<foo> bar(new foo(x, 1, "buz"));

Yes, it is one more example when function traits would be useful.

What chances that boost::smart_ptr will be eventually modified?

-- 
jk

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