Boost logo

Boost Users :

From: Hurd, Matthew (hurdm_at_[hidden])
Date: 2003-08-25 07:28:42


Hi,

Is there a short cut for bind(&class::method_name, this, _1)? I could wrap
it in a macro, as I use it enough, but is there something nicer I'm missing?

I often just do the for loop as it is a little more readable, maybe...

For example,

                for(
                    some_collection::iterator i = check_list.begin();
                    i!= check_list.end();
                    ++i )
                {
                    turn_off_calcs(*i);
                }

Is hopefully the same as

                for_each(
                    check_list.begin(),
                    check_list.end(),
 
lambda::bind(&instrument_store::turn_off_calcs,this,lambda::_1)
                );

Regards,

Matt.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net