From 0dc0969cd0a732760f0aa79942a04e0eaef297c4 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 16 Apr 2017 16:03:23 +0000 Subject: Vendor import of libc++ trunk r300422: https://llvm.org/svn/llvm-project/libcxx/trunk@300422 --- .../alg.modifying.operations/alg.replace/replace_copy_if.pass.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test/std/algorithms/alg.modifying.operations/alg.replace/replace_copy_if.pass.cpp') diff --git a/test/std/algorithms/alg.modifying.operations/alg.replace/replace_copy_if.pass.cpp b/test/std/algorithms/alg.modifying.operations/alg.replace/replace_copy_if.pass.cpp index 1eff3d39e20e..f2ffece12e8b 100644 --- a/test/std/algorithms/alg.modifying.operations/alg.replace/replace_copy_if.pass.cpp +++ b/test/std/algorithms/alg.modifying.operations/alg.replace/replace_copy_if.pass.cpp @@ -23,6 +23,8 @@ #include "test_iterators.h" +bool equalToTwo(int v) { return v == 2; } + template void test() @@ -30,8 +32,8 @@ test() int ia[] = {0, 1, 2, 3, 4}; const unsigned sa = sizeof(ia)/sizeof(ia[0]); int ib[sa] = {0}; - OutIter r = std::replace_copy_if(InIter(ia), InIter(ia+sa), OutIter(ib), - std::bind2nd(std::equal_to(), 2), 5); + OutIter r = std::replace_copy_if(InIter(ia), InIter(ia+sa), + OutIter(ib), equalToTwo, 5); assert(base(r) == ib + sa); assert(ib[0] == 0); assert(ib[1] == 1); -- cgit v1.2.3