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

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

#ifdef MAIN
#define unegate1_test main
#endif
struct odd : public unary_function<int, bool>
{
  odd() {}
  bool operator()(int n_) const { return(n_ % 2) == 1; }
};
#endif
int unegate1_test(int, char**)
{
  cout<<"Results of unegate1_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, unary_negate<odd, bool>(odd()));
  if(p != array + 3)
    cout << *p << endl;
  return 0;
}
