Boost logo

Boost Users :

Subject: Re: [Boost-users] [lambda] std::sort problem
From: Stuart Dootson (stuart.dootson_at_[hidden])
Date: 2009-01-25 05:42:28


On Sun, Jan 25, 2009 at 9:46 AM, Micha³ Nowotka <mmmnow_at_[hidden]> wrote:
> Ok, but there is another problem.
>
> Suppose i defined:
> typedef MyType std::pair<const SomeClass*,double*>;
>
> So if I want to keep DRY i should write:
>
> lambda::_1 ->*&MyType::value_type::second > lambda::_2
> ->*&MyType::value_type::second);
>
> I also tried:
> bind(&MyType::value_type::second, lambda::_1) >
> bind(&MyType::value_type::second, lambda::_2)
>
> but none of this expression works for me.

Shouldn't that be &MyType::second - std::pair has no value_type?

Stuart Dootson


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