
11 Jan
2007
11 Jan
'07
11 p.m.
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