title: What is the difference between std::function and std::mem_fn
body: <p>I am having trouble figuring out the difference between the two function wrappers <a href="http://en.cppreference.com/w/cpp/utility/functional/function" rel="nofollow noreferrer"><code>std::function</code></a> and <a href="http://en.cppreference.com/w/cpp/utility/functional/mem_fn" rel="nofollow noreferrer"><code>std::mem_fn</code></a>. From the description, it seems to me that std::function does everything <code>std::mem_fn</code> does and more. In which instance would one use <code>std::mem_fn</code> over <code>std::function</code>?</p>