Boost logo

Boost Users :

From: Mark Ruzon (ruzon_at_[hidden])
Date: 2007-01-11 18:00:28


Assume we have a range of objects of type tuple<T1,T2> and a function
object that compares two objects of type T1. How would a person sort this
range using this function object and bind? I want something along the
lines of:

std::sort(first, last, boost::bind<bool>(comp,
   boost::bind(boost::get<0>, _1),
   boost::bind(boost::get<0>, _2)));

but this isn't remotely close to compiling. I could create a custom
function object, but I'd rather learn how to use bind properly.

Thanks,
Mark


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net