Hi All
I created a lambda expression inside my std::for_each call.
Inside it there is code like this one, but I have building error telling me that
error: expected primary-expression before ‘break’
error: expected `]' before ‘break’
Do you know what it is and how to fix it?
The same applies to return statement
Thanks
AFG
namespace bl = boost::lambda;
int a, b;
bl::var_type< int >::type a_( bl::var( a ) );
bl::var_type< int >::type b_( bl::var( b ) );
std::for_each( v.begin(), v.end(), (
if_( a_ > _b_ )
[
std::cout << _1,
break
]
));