From: Douglas Gregor (gregod_at_[hidden])
Date: 2004-03-11 16:07:33
On Thursday 11 March 2004 01:29 pm, Brian McNamara wrote:
> I am also curious about how cases like
> void f(int,int,int);
> function<void(int,int)> tmp1 = bind(&f,5,_1,_2);
> function<void(int,int)> tmp2 = bind(&f,_1,_2,7);
> bind(tmp1,_1,7) == bind(tmp2,5,_1) // ?
> (ought to) work. (If my intent isn't clear above, I am trying to bind
> the first and third arguments of f() in two different ways. Presumably
> the LHS and RHS of the operator== on the last line have different
> types, despite the fact that they "are the same function", for some
> definition of sameness.)
It'll fail to compile. You can't compare boost::function objects to each
other, only to targets of those function objects.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk