5 Feb
2010
5 Feb
'10
9:50 p.m.
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?