$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
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
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
]
));