Boost logo

Boost Users :

From: Meryl Silverburgh (silverburgh.meryl_at_[hidden])
Date: 2007-02-09 12:25:46


Hi,

I have code like this which sort a Rect, which compare value of
getY(), like this:

  vector<Rect*> rl;

    ::sort(rl.begin(), rl.end(), bind(less < int >(),
bind(&Rect::getY, _1), bind(&Rect::getY, _2)));

how can I change it so that it compares with the 'y' attribute? like,
rect1.y < rect2.y?

Thank you.


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