On Nov 30, 2006, at 11:38 AM, Noah Roberts wrote:
On 11/30/06, Joaquín Mª López Muñoz
wrote: bind( &deref_val_type::f, *_1 ) == 5 may work with Lambda.
Almost: the translation of the expression to the lambda world, i.e.
l::bind( &deref_val_type::f, *l::_1 ) == 5
(assuming namespace l = boost::lambda) fails to compile because it indices the declaration of
boost::tuples::cons
::head which is not instantiable deref_val_type is abstract.
Right, works fine until working with abstract types. Kind of frustrating to toss it into a test with mock objects and not realize you also need to test that your algorithms work with abstract interfaces.
The closest I
can get in BLL to your formulation is:
l::bind( &deref_val_type::f, &*l::_1 ) == 5
which works as expected.
Yep, that works. Not exactly what I wanted to see, and I should have thought of it, but there it is. I think this is something the lambda folks might want to work on as it isn't exactly favorable (is it in the works?).
On the list... needs a non-trivial amount of changes Jaakko
Bind is a lot easier to work with because it catches on. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users