Thanks a lot!<div>Afg<br><br><div class="gmail_quote">On Wed, Apr 7, 2010 at 5:22 PM, Steven Watanabe <span dir="ltr"><<a href="mailto:watanabesj@gmail.com">watanabesj@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> AMDG<div><div></div><div class="h5"><br> <br> Conoscenza Silente wrote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> I am trying to use boost::lambda using logicat operator.<br> I would like to use it in a STL �std::find_if call.<br> <br> What I receive is always the same error<br> �error: no match for �operator==� in �boost::lambda::<unnamed>::_1 == 13�<br> <br> Do you know what I am doing wrong?<br> Thanks<br> AFG<br> <br> using namespace boost::assign;<br> <br> int main( int argc, char** argv ){<br> <br> � �std::vector< int > v;<br> � �v += 12,13,14,15;<br> <br> � �bool found_tmp = false;<br> � �boost::lambda::var_type< bool >::type found(<br> � �boost::lambda::var(found_tmp) );<br> <br> � �std::find_if(<br> � � � �v.begin(),<br> � � � �v.end(),<br> � � � �(<br> � � � � � �found = ( boost::lambda::_1 == 13 ),<br> � � � � � �return found<br> � � � �) );<br> }<br> �<br> </blockquote> <br></div></div> Don't try to return found inside the lambda expression.<br> <br> Try<br> <br> bool found = std::find_if(v.begin(), v.end(), boost::lambda::_1 == 13) != v.end();<br> <br> In Christ,<br> Steven Watanabe<br> <br> _______________________________________________<br> Boost-users mailing list<br> <a href="mailto:Boost-users@lists.boost.org" target="_blank">Boost-users@lists.boost.org</a><br> <a href="http://lists.boost.org/mailman/listinfo.cgi/boost-users" target="_blank">http://lists.boost.org/mailman/listinfo.cgi/boost-users</a><br> </blockquote></div><br></div>