Boost logo

Boost Users :

Subject: [Boost-users] break and return statement in lambda expression
From: Conoscenza Silente (abruzzoforteegentile_at_[hidden])
Date: 2010-07-22 07:36:51

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

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

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,

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at