
Douglas Gregor wrote:
It's not really an alternative. We have two possible reasons that a binding operator would want to overload operator==: for comparison or for creating a function object. I'm just saying we don't have to choose between the alternatives, because we can overload operator== to return a function object that also has a conversion to bool that compares the stored function objects.
Yep, unfortunately not all of us can, but let's keep implementation considerations out of it for now.
The benefit is that we don't need to introduce a "function_equal" to compare functions and we can still choose whether to support (bind(f, _1) == bind(g, _1))(5)
But there's still the implicit assumption that not introducing function_equal is a benefit. I don't see why this should be so clear cut. What particular problems do you see with function_equal?