Boost logo

Boost Users :

Subject: Re: [Boost-users] Equality comparison of boost::function<>
From: Zachary Turner (divisortheory_at_[hidden])
Date: 2009-08-10 13:43:37


On Mon, Aug 10, 2009 at 10:51 AM, Steven Watanabe<watanabesj_at_[hidden]> wrote:
> This ought to return false because the types are different.
>
>> So in short, what is the flaw in just testing the way two function
>> objects are represented internally
>
> It would be surprising, because nothing else works that way.

I agree it might be surprising from an implementation standpoint. But
are there examples of functors such that equality implemented this way
would return a surprising result? If the result isn't surprising,
then I don't think the implementation should matter much, as long as
it relies only on standards conformant language aspects.

Again I could just be overlooking something due to lack of
understanding of the implementation details of boost::function<>, but
at least on the surface it seems to me that the behavior would always
produce expected results.


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