From 589453458ddd21b3ed46600d88dffc1af025e85d Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Tue, 29 Aug 2017 01:10:51 +0000 Subject: Fix test for C++03 llvm-svn: 311967 --- .../algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'libcxx/test/std/algorithms/alg.sorting') diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp index 6fd8fd4f924..992862a4ecf 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp @@ -127,11 +127,12 @@ void test_PR31166 () { typedef std::pair P; typedef std::vector

V; - const V vec {{1, 0}, {2, 0}, {2, 1}, {2, 2}, {2, 3}}; + P vec[5] = {P(1, 0), P(2, 0), P(2, 1), P(2, 2), P(2, 3)}; for ( int i = 0; i < 5; ++i ) { - V res = vec; + V res(vec, vec + 5); std::inplace_merge(res.begin(), res.begin() + i, res.end(), less_by_first()); - assert(res == vec); + assert(res.size() == 5); + assert(std::equal(res.begin(), res.end(), vec)); } } -- cgit v1.2.3