#include <algorithm>
#include <boost/bind.hpp>
#include <functional>
#include <utility>
#include <vector>
typedef std::pair<int,int> MyPair;
typedef std::vector<MyPair> MyPairList;
MyPairList pairs;
void foo(void)
{
using boost::bind;
std::sort(pairs.begin(),
pairs.end(),
bind(std::less<int>(),
bind(&MyPair::first, _1),
bind(&MyPair::first, _2)));
}
int main(){
foo();
}