Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void DoSomething(const boost::function<bool ()>& condition, other stuff);
- boost::function<bool (size_t)> ge = boost::bind(std::greater_equal<size_t>(),
- _1, threshold);
- boost::function<size_t ()> size = boost::bind(&std::vector<std::string>::size,
- data);
- DoSomething(boost::lambda::bind(ge, boost::lambda::bind(size)), other stuff);
- DoSomething(delegate() { return data.size() >= threshold; }, other stuff);
- DoSomething(() => (data.size() >= threshold), other stuff);
- boost::function<size_t ()> size = boost::bind(&std::vector<std::string>::size,
- boost::ref(data));
- boost::function<bool ()> cond =
- (boost::bind(&std::vector<std::string>::size, boost::ref(data))
- >= threshold);
- DoSomething(cond, other stuff);
Add Comment
Please, Sign In to add comment