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

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

#ifdef MAIN 
#define uprbnd1_test main
#endif
#endif
int uprbnd1_test(int, char**)
{
  cout<<"Results of uprbnd1_test:"<<endl;
  int array[20];
  for(int i = 0; i < 20; i++)
  {
    array[i] = i/4;
    cout << array[i] << ' ';
  }
  cout
    << "\n3 can be inserted at index: "
    <<(upper_bound(array, array + 20, 3) - array)
    << endl;
  return 0;
}
