I'm having a look at the Boost libraries that were included in C++'s Technical Report 1 and trying to understand what each does.
I've just finished running an example for boost::mem_fn
and now I'm wondering what's the point of using it instead of the better boost::bind
. As far as I understand, both of them return a function object pointing to a member function. I find mem_fn
so limited that I can't find a scenario where using it would be better than bind
.
Am I missing something? Is there any case in which bind cannot replace mem_fn?
mem_fn
is much smaller than bind
, so if you only need the functionality of mem_fn
it's a lot less code to pull in.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With