Please have a look at this example posted by Johannes Schaub to sort a vector of pairs:
How do I sort a vector of pairs based on the second element of the pair?
Your theory is correct, see:
http://www.boost.org/doc/libs/1_44_0/libs/bind/bind.html#operators