|
Boost Users : |
From: chun ping wang (cablepuff_at_[hidden])
Date: 2007-08-09 05:02:22
>From my guess, reason is that second is a member value of a complex class.
Naturally you need the address of target member function. Lambda by itself
is not a particular type. It doesn't have any members function or data. The
only thing it knows its value semantics.
On 8/9/07, Olaf van der Spek <olafvdspek_at_[hidden]> wrote:
>
> On 8/9/07, Peter Dimov <pdimov_at_[hidden]> wrote:
> > Olaf van der Spek wrote:
> >
> > >>> sort(countries1.begin(), countries1.end(),
> > >>> _1->second > _2->second);
> >
> > sort( countries1.begin(), countries1.end(),
> >
> > bind( &countries_t::value_type::second, *_1 ) > bind(
> > &countries_t::value_type::second, *_2 )
>
> Thanks, that did the trick. I didn't know you could use bind like this
> too. But why does the simpler syntax not work?
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
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