[boost-users][bind/lambda] how to
Hello, struct Inner { bool good() const; }; struct Outer { Inner inner_; const Inner &inner() const { return inner_; } }; std::vector<Outer> outers; I'd like to find Outer whose Inner is good(): std::find_if(outers.begin(), outers.end(), ?); How should I use boost::bind or boost::lambda to tell the stl algorithms to call Inner::good()? Thank you in advance!
I think what you're after is documented here:
http://www.boost.org/doc/libs/1_35_0/libs/bind/bind.html#nested_binds
Here's my attempt (though I haven't got access to a compiler atm):
function1
Hello,
struct Inner { bool good() const; }; struct Outer { Inner inner_; const Inner &inner() const { return inner_; } };
std::vector<Outer> outers;
I'd like to find Outer whose Inner is good():
std::find_if(outers.begin(), outers.end(), ?);
How should I use boost::bind or boost::lambda to tell the stl algorithms to call Inner::good()?
Thank you in advance! _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Alex MDC
-
Igor R