Boost logo

Boost :

From: Pavel Chikulaev (pavel.chikulaev_at_[hidden])
Date: 2005-03-06 16:55:32


"Matthias Kaeppler" <nospam_at_[hidden]> wrote in message
news:d0fsnv$dec$1_at_sea.gmane.org...
> std::vector<int*> vec;
Now std::sort(vec.begin(), vec.end(), std::less<int>()) won't work.
But I can do it with Boost::Bind:
    std::sort(vec.begin(), vec.end(), boost::bind(std::less<int>(), *_1,
*_2));

Boost::Bind's solution is much better that yours, because it constists
indirector_unary, indirector_binary, indirector_ternary and so on.

Pavel Chikulaev


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk