#ifndef SINGLE
//  An adapted ObjectSpace example for use with SGI STL

#include <iostream.h>
#include <algo.h>

#ifdef ACORN_CFRONT
TEMPLATE_ptr_fun_unary(int, bool)
#endif


#ifdef MAIN
#define ptrunf2_test main
#endif
static bool even(int n_)
{
  return(n_ % 2) == 0;
}
#endif
int ptrunf2_test(int, char**)
{
  cout<<"Results of ptrunf2_test:"<<endl;

#ifndef ACORN_CFRONT
int array [3] = { 1, 2, 3 };
#else
static int array [3] = { 1, 2, 3 };
#endif

  int* p = find_if(array, array + 3, ptr_fun(even));
  if(p != array + 3)
    cout << *p << " is even" << endl;
  return 0;
}
