equal
deleted
inserted
replaced
|
1 |
|
2 // STLport regression testsuite component. |
|
3 // To compile as a separate example, please #define MAIN. |
|
4 |
|
5 #include <iostream> |
|
6 #include <algorithm> |
|
7 #include "unary.h" |
|
8 |
|
9 #ifdef MAIN |
|
10 #define unegate2_test main |
|
11 #endif |
|
12 |
|
13 #if !defined (STLPORT) || defined(__STL_USE_NAMESPACES) |
|
14 using namespace std; |
|
15 #endif |
|
16 int unegate2_test(int, char**) |
|
17 { |
|
18 cout<<"Results of unegate2_test:"<<endl; |
|
19 |
|
20 int array [3] = { 1, 2, 3 }; |
|
21 |
|
22 int* p = find_if((int*)array, (int*)array + 3, not1(odd())); |
|
23 if(p != array + 3) |
|
24 cout << *p << endl; |
|
25 |
|
26 if(2!=*p) |
|
27 return 1; |
|
28 else |
|
29 return 0; |
|
30 } |