Boost logo

Boost :

From: Rene Jager (renej_at_[hidden])
Date: 2001-08-18 23:56:31

John Maddock wrote:


>Making mem_fun work with a shared pointer is nice, but is it really a
>killer feature? Users can just as easily pass "my_shared_ptr.get()" rather
>than "my_shared_ptr" into this, and since these are generally used as
>temporaries there is no lifetime management issue here iether IMO.
mem_fun does not only work with shared_ptr, but with any smart pointer,
ones that support operator->*; for those types the get_pointer function
should just
return the smart pointer;
overloading of operator->* is not applied ofen for smart pointers, but
can be very
useful; for example, I use it to do automagic guarding (mutex) of the
object the
member function is called for...


Boost list run by bdawes at, gregod at, cpdaniel at, john at