27 May
2005
27 May
'05
12:50 p.m.
On May 27, 2005, at 6:10 AM, Stuart Dootson wrote:
I'm not certain (from the documentation) whether see if two boost::function objects are equal (I tend to think not!).
Sounds like I need to fix the documentation.
The code below doesn't compile on VC7.1, raising an error about 4 ambiguous overloads of operator==
#include
int Flip() { return 2; }
int main(int,char**) { boost::function
f1 = &Flip; boost::function f2 = &Flip; bool const areTheyEqual = (f1 == f2); } Can someone confirm if this should/should not compile, please?
It should not compile. Comparison of two function<> objects is not implementable in genera (without compiler extensions or significant user pain). Doug