std::mem_fun vs std::mem_fn
问题 What is the difference between std::mem_fun and std::mem_fn ? Why is the naming so confusing? Boost's documentation says that std::mem_fn can replace std::mem_fun in most cases. So in what situation would you still use std::mem_fun ? 回答1: std::mem_fun is deprecated. std::mem_fn can do everything it does, and it does it more conveniently. The relation between the two is the same as the relation between std::bind1st / std::bind2nd and the C++11 std::bind . Both std::mem_fn and std::bind were