Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2004-03-09 10:00:33

What do you think this expression should do:

    bind(f, _1) == bind(g, _1)

Currently, boost::bind returns f == g when f and g are of the same type, and
fails at compile type otherwise (this is the equality comparison feature
Doug requested).

lambda::bind returns lambda(x) { return f(x) == g(x) }.

It is clear that a future boost::bind that has limited lambda support would
be even more problematic (as would be a future equality comparable
boost.lambda). In that case, the expression will always compile, but do
something different depending on whether f and g are of the same type.

Peter Dimov

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