Boost logo

Boost :

From: Matthias Kaeppler (nospam_at_[hidden])
Date: 2005-03-06 16:37:29


Pavel Chikulaev wrote:
> "Matthias Kaeppler" <nospam_at_[hidden]> wrote in message
> news:d0ff4g$7rm$1_at_sea.gmane.org...
>
>>Ex.:
>>inline int plus( int a, int b )
>>{
>> return a + b;
>>}
>>
>>std::vector<int> vec;
>>// ...
>>std::sort(vec.begin(),vec.end(),indirect_binary(std::less<int>()));
>
> std::sort(vec.begin(), vec.end(), std::lest<int>()) works just fine. (I
> used VC7.1)
>
>>std::transform(vec.begin(),vec.end(),vec.begin(),std::ostream_iterator<int>(std::cout,"\n"),indirect_binary(plus));
>
> I think it also works with out your indirect_binary.
>
> It's VERY VERY similar to std::mem_fun.
>
> --
> Pavel Chikulaev
>
>
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>

My bad, it should read:

  std::vector<int*> vec;

-- 
Matthias Kaeppler

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