|
Boost : |
From: Douglas Gregor (gregod_at_[hidden])
Date: 2004-03-10 00:09:34
On Tuesday 09 March 2004 10:00 am, Peter Dimov wrote:
> 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) }.
Well, the lambda function object returned by bind(f, _1) == bind(g, _1) could
be convertible to bool. Too cute? It might just be slick enough to work.
Doug
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk