9 Aug
2007
9 Aug
'07
3:17 p.m.
Olaf van der Spek schrieb:
On 8/8/07, chun ping wang
wrote: use bind. try using bind. namespace bll = boost::lambda;
std::sort(countries1.begin(), countries1.end(), bll::bind(&countries_t::second, _1) < bll::bind(&countries_t::second, _2));
Does that compile for you? It doesn't for me. Note that second is not a function.
Change the last line to bll::bind(&countries_t::second, bll::_1) < bll::bind(&countries_t::second, bll::_2)); and it should compile. Regards, Christian [snip]