[Bind] Retrun-type of bind expressions
Hello, I am currently trying to find a way to conveniently combine different predicates for a boost::filtered_graph. boost::filtered_graph needs a specification of the template-arguments. Therefore it important to know the return type of a bound expression. I have read that actually the return type of bound expression is "undeterminated" and one should rather use boost::function. However, I could not come up with an idea to realize the following, either with bind or with function: using namespace boost; // Both predicates are function objects: Default Constructible, Copy Constructible and only having "template< class V > bool operator()( const V& v)" Pred1 pred1; Pred2 pred2; filtered_graph< MyGraph, keep_all, ?bind_return_type?> fg( g, keep_all(), bind<bool>(pred1, _1) && bind<bool>(pred2, _1)); The question is now how to specify the bind_return_type, or how to do this with boost::function? Besides that, I hope that the logical combination (both predicates should hold) and use of bind() in the example is correct?! Best, Cedric
participants (1)
-
Cedric Laczny