|
Boost Users : |
Subject: Re: [Boost-users] Equality comparison of boost::function<>
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2009-08-09 18:32:11
Scott McMurray wrote:
>
> But what about this?
>
> less<int> f;
> function<bool(int,int)> g = f;
> function<bool(int,int)> h = f;
>
> Checking based on address won't be able to tell that g == h, since
> copies of f will be taken for lifetime reasons.
That's not a problem at all. Boost.function holds its content by copy.
The real issue is that function objects aren't equality comparable.
Function pointers are, but not function objects.
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