This little piece of code,

#include <algorithm>
#include <functional>

template <typename InputIterator, typename Predicate>
  inline bool if_all( InputIterator first, InputIterator last, Predicate predicate )
{
  return std :: find_if( first, last, std :: not1( predicate ) ) == last;
}

#include <vector>
#include "boost/lambda/lambda.hpp"

int main( )
{
  using namespace boost :: lambda;
  std :: vector<int> v;
  if_all( v.begin( ), v.end( ), _1 == 3 );
  return 0;
}

Gives a compiler error, which I think tells me that my lambda expression, _1 == 3
does not provide the argument_type typedef. I thought lambda expressions were
careful to to do this. What am I doing wrong?

Thanks, Rob.

--
ACCU - Professionalism in programming - http://www.accu.org