please have @ example posted johannes schaub sort vector of pairs: how sort vector of pairs based on second element of pair? std::sort(a.begin(), a.end(), boost::bind(&std::pair<int, int>::second, _1) < boost::bind(&std::pair<int, int>::second, _2)); i thought understand boost::bind, have trouble one. question 1: the sort algorithm expecting predicate function third parameter. see here, boolean expression. missing?: boost::bind(&std::pair<int, int>::second, _1) < boost::bind(&std::pair<int, int>::second, _2) does boost::bind library overload operator< 2 binds, , returning kind of function pointer (like lambda)? question 2: gets me confused: boost::bind(&std::pair<int, int>::second, _1) usually there kind of function pointer first parameter of bind call, here address of class member? result of particular bind? thanks time & help boost::bind overloads operator ! , relat...