...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::compute::bind
// In header: <boost/compute/functional/bind.hpp> template<typename F, class... Args> unspecified bind(F f, Args... args);
Returns a function wrapper which invokes f
with args
when called.
For example, to generate a unary function object which returns true
when its argument is less than 7
:
using boost::compute::less; using boost::compute::placeholders::_1; auto less_than_seven = boost::compute::bind(less<int>(), _1, 7);