Boost logo

Boost Users :

From: Stuart Dootson (stuart.dootson_at_[hidden])
Date: 2005-05-27 06:10:13


I'm not certain (from the documentation) whether see if two
boost::function objects are equal (I tend to think not!). The code
below doesn't compile on VC7.1, raising an error about 4 ambiguous
overloads of operator==

#include <boost/function.hpp>

int Flip() { return 2; }

int main(int,char**)
{
   boost::function<int()> f1 = &Flip;
   boost::function<int()> f2 = &Flip;
   bool const areTheyEqual = (f1 == f2);
}

Can someone confirm if this should/should not compile, please?

Stuart Dootson


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