$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] Equality comparison of boost::function<>
From: Scott McMurray (me22.ca+boost_at_[hidden])
Date: 2009-08-08 17:11:53
2009/8/8 Christopher Jefferson <chris_at_[hidden]>:
>
> That sounds very unnecessary. Surely it would be sufficient, and what most
> people would expect, to check if the two function objects point to the same
> function (in the sense of location in memory), as opposed to logically
> equivalent functions?
>
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.