From 0a1cbcf2b75445f1bcf7de16004fc22f624ca376 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Sat, 24 Dec 2016 00:40:45 +0000 Subject: [PATCH] fix newly failing c++03 tests git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@290472 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../thread.condition.condvarany/wait_for_pred.pass.cpp | 9 ++++++--- .../bind/func.bind/func.bind.place/placeholders.pass.cpp | 2 ++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/test/std/thread/thread.condition/thread.condition.condvarany/wait_for_pred.pass.cpp b/test/std/thread/thread.condition/thread.condition.condvarany/wait_for_pred.pass.cpp index d7066f4bf..47da78833 100644 --- a/test/std/thread/thread.condition/thread.condition.condvarany/wait_for_pred.pass.cpp +++ b/test/std/thread/thread.condition/thread.condition.condvarany/wait_for_pred.pass.cpp @@ -44,8 +44,9 @@ int test1 = 0; int test2 = 0; int runs = 0; +bool expect_result = false; -void f(bool expect_result) +void f() { typedef std::chrono::system_clock Clock; typedef std::chrono::milliseconds milliseconds; @@ -73,8 +74,9 @@ void f(bool expect_result) int main() { { + expect_result = true; L1 lk(m0); - std::thread t(f, /*expect_result*/true); + std::thread t(f); assert(test1 == 0); while (test1 == 0) cv.wait(lk); @@ -87,8 +89,9 @@ int main() test1 = 0; test2 = 0; { + expect_result = false; L1 lk(m0); - std::thread t(f, /*expect_result*/false); + std::thread t(f); assert(test1 == 0); while (test1 == 0) cv.wait(lk); diff --git a/test/std/utilities/function.objects/bind/func.bind/func.bind.place/placeholders.pass.cpp b/test/std/utilities/function.objects/bind/func.bind/func.bind.place/placeholders.pass.cpp index c1f2899f1..59709d0ed 100644 --- a/test/std/utilities/function.objects/bind/func.bind/func.bind.place/placeholders.pass.cpp +++ b/test/std/utilities/function.objects/bind/func.bind/func.bind.place/placeholders.pass.cpp @@ -57,6 +57,7 @@ constexpr decltype(std::placeholders::_10) cp10 = std::placeholders::_10; #endif // TEST_STD_VER >= 11 void use_placeholders_to_prevent_unused_warning() { +#if TEST_STD_VER >= 11 ((void)cp1); ((void)cp2); ((void)cp3); @@ -77,6 +78,7 @@ void use_placeholders_to_prevent_unused_warning() { ((void)default8); ((void)default9); ((void)default10); +#endif } int main()