Boost logo

Boost Users :

From: Ovanes Markarian (om_boost_at_[hidden])
Date: 2007-03-12 11:03:54


On Mon, March 12, 2007 15:44, Peter Dimov wrote:
> Misiu wrote:
>> Ovanes Markarian napisał(a):
>>> [...]
>>>
>>> You could also skip the compare_functions implementation and use
>>> boost::lambda and placeholder library to write you code like this:
>>> std::find_if(fun_list.begin(), fun_list.end(), _1==fun);
>>
>> When I tried this solution (really nice one) on MSVC 2003 I got this
>> error:
>>
>> d:\boost_ref_test\main.cpp(18): error C2666: 'boost::operator`=='' : 4
>> overloads have similar conversions
>
> You can't compare two function<> objects with ==. What you can do is compare
> a function<> with the actual contents. That is,

 My appologies. I wrote this without double checking the doc. Thought it would work, since I
 remembered that there was a comparison operator.

 With Kind Regards,

 Ovanes Markarian


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