Boost logo

Boost :

From: David B. Held (dheld_at_[hidden])
Date: 2002-06-19 04:14:03


When passing the result of bind() to a function, is it advisable to
pass by value or const&? Like so:

template <class F>
void Foo::Bar(F f) // const& better?
{
    for_each(v.begin(), v.end(), f);
}

Bar(bind(&my_func, _1));

Dave


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk