Boost logo

Boost :

From: kalin (kalin.eh_at_[hidden])
Date: 2005-03-06 21:57:54


> std::sort(vec.begin(), vec.end(), boost::bind(std::less<int>(), *_1,
*_2));
>
> deref.cpp:154: error: no match for 'operator*' in '*<unnamed>::_1'
> deref.cpp:154: error: no match for 'operator*' in '*<unnamed>::_2'
>
> Am I missing something?
>

If I remember correctly, the Boost.Bind placeholders (_1, _2, etc) work for
non-operator usage.
The Boost.Lambda placeholders support all the operator overloads.

kalin


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