|
Boost : |
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2007-06-04 22:57:35
One important advantage of using boost::function is that it acts like a
function pointer, reducing physical coupling between compilation units. This
is very much like shared_ptr.
A nice feature of shared_ptr is that it has a single template parameter, T,
even though diferent instances of shared_ptr<T> can use different
allocators.
When using boost::function, one can also provide an allocator, but unlike
shared_ptr, the allocator is a default parameter of the boost::function
class template.
Is there a reason why this is necessary? Can't boost::function use similar
technique to the one employed by shared_ptr to avoid the need for this
second template parameter?
Emil Dotchevski
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk