//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // template void remove_if(Pred pred); #include #include #include bool g(int i) { return i < 3; } int main() { int a1[] = {1, 2, 3, 4}; int a2[] = {3, 4}; std::list c(a1, a1+4); c.remove_if(g); assert(c == std::list(a2, a2+2)); }