Boost logo

Boost Users :

From: Jim Pritts (jpritts_at_[hidden])
Date: 2005-07-15 02:52:14


Hello,

Is it possible to do something like the following:

    typedef boost::tuple<double, int, int> element;

    std::vector<element> d;

    std::vector<element>::iterator i = std::max_element(d.begin(), d.end(),
                                                  bind(std::max<double>,bind(get<0>,_2),_1));

In other words, I would like the functionality of select1st with
std::pair.

Thanks,
  Jimmy.


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