Revert "Merge to upstream r304942."
This reverts commit83b1388ecd, reversing changes made tof20819f925. Test: treehugger Bug: None
This commit is contained in:
@@ -20,24 +20,17 @@
|
||||
|
||||
#include "test_iterators.h"
|
||||
|
||||
struct eq {
|
||||
eq (int val) : v(val) {}
|
||||
bool operator () (int v2) const { return v == v2; }
|
||||
int v;
|
||||
};
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
int ia[] = {0, 1, 2, 2, 0, 1, 2, 3};
|
||||
const unsigned sa = sizeof(ia)/sizeof(ia[0]);
|
||||
assert(std::count_if(input_iterator<const int*>(ia),
|
||||
input_iterator<const int*>(ia + sa),
|
||||
eq(2)) == 3);
|
||||
std::bind2nd(std::equal_to<int>(),2)) == 3);
|
||||
assert(std::count_if(input_iterator<const int*>(ia),
|
||||
input_iterator<const int*>(ia + sa),
|
||||
eq(7)) == 0);
|
||||
std::bind2nd(std::equal_to<int>(),7)) == 0);
|
||||
assert(std::count_if(input_iterator<const int*>(ia),
|
||||
input_iterator<const int*>(ia),
|
||||
eq(2)) == 0);
|
||||
std::bind2nd(std::equal_to<int>(),2)) == 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user