Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2004-01-21 09:33:14

Douglas Paul Gregor wrote:
> boost::bind would need to be EqualityComparable for this to work, and
> at the moment it is not. It's technically trivially to do, we need only
> convince Peter :)

There are some interesting corner cases.

    int a = 1, b = 1;

    int f(int x) { return x; }

    bind(f, a) == bind<int>(f, a); // true, false, or ill-formed?
    bind(f, 1) == bind(f, 1L); // true, false, or ill-formed?
    bind(f, ref(a)) == bind(f, ref(b)); // true or false?

and the related question whether reference_wrapper needs operator== and if
so, what are its semantics. However, ...

> On Wed, 21 Jan 2004, Edward Diener wrote:
>> The million dollar question is: if one uses boost::bind as the
>> mechanism of passing a member function as an underlying function
>> object to boost::function, will this new functionality somehow let
>> me check if a particular member function is indeed the one that
>> boost::function holds as its function object ? Or maybe it needs to
>> be rephrased as: does an instance of boost::bind allow me to pass
>> its underlying function object to the new equality operator of
>> boost::function and is this underlying function object
>> EqualityComparable ?

... I am not entirely sure that I understand the question.

Boost list run by bdawes at, gregod at, cpdaniel at, john at