A question on if_then_else in lambda.Can any one with kindness help me?

I use Dev-c++, and found a problem: # indcude "boost/lambda/if ............... typedef std::map<int, int> IIPrimemap; IIPrimemap primemapvec; ....................... int nnumber; int switchvalue; ........................ if_then_else(var(nnumber)==1,var(switchvalue)=1, if_then_else(count_if(primemapvec.begin(),primemapvec.end(), bind(&IIPrimemap::value_type::second,_1)>2)>0, var(switchvalue)=2,var(switchvalue)=3)); ........................ But the complier told me that: no matching function for call to `if_then_else(bool, const boost::lambda::lambda_functor<boost::lambda::lambda_functor_base<boost::lambda::other_action<boost::lambda::assignment_action>, I do not know how to handle it. Can any one with knidness help me?

AMDG fmingu wrote:
I use Dev-c++, and found a problem: # indcude "boost/lambda/if ............... typedef std::map<int, int> IIPrimemap; IIPrimemap primemapvec; ....................... int nnumber; int switchvalue; ........................ if_then_else(var(nnumber)==1,var(switchvalue)=1, if_then_else(count_if(primemapvec.begin(),primemapvec.end(), bind(&IIPrimemap::value_type::second,_1)>2)>0, var(switchvalue)=2,var(switchvalue)=3)); ........................ But the complier told me that:
no matching function for call to `if_then_else(bool, const boost::lambda::lambda_functor<boost::lambda::lambda_functor_base<boost::lambda::other_action<boost::lambda::assignment_action>, I do not know how to handle it. Can any one with knidness help me?
if_then_else is only overloaded to take a lambda expression. try if_then_else(boost::lambda::constant(count_if(...)), ..., ...) In Christ, Steven Watanabe
participants (2)
-
fmingu
-
Steven Watanabe