|
Boost Users : |
Subject: [Boost-users] lambda control structures
From: Archie14 (admin_at_[hidden])
Date: 2010-02-05 16:50:16
I have following code:
bool a = true;
std::for_each (_params.begin(), _params.end(),
boost::lambda::if_(! boost::lambda::bind
(&inputParams::getParamValue, this, boost::lambda::_1, boost::ref(_fddata)))
[a = false]);
if (! a)
...
What I am trying to achieve is to stop for_each if "getParamValue" returns
false. However I can't find a way to use "return" in the second part of
boost::lambda::if_, so I am using a dummy var "a" to check it after the loop
completes.
My question is: what is the right way to use lambda control structure in this
case?
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net