#include #include int main() { using namespace __gnu_test; using namespace std; time_counter time; resource_counter resource; int iarr[1000000]; for (int i = 0; i != 1000000; ++i) iarr[i] = i; int jfound = 0; start_counters(time, resource); for (int j = 0; j != 100; ++j) { int found = 0; for (int i = 0; i != 1000000; ++i) found += lower_bound(iarr + 0, iarr + 1000000, i) == iarr + i; jfound += found == 1000000; } stop_counters(time, resource); report_performance(__FILE__, "lower_bound (int)", time, resource); return jfound == 1000 ? 0 : 1; }