diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp --- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include "test_macros.h" @@ -51,7 +52,7 @@ bool f_run = false; -void f() +void f(const std::vector&) { f_run = true; } @@ -125,9 +126,10 @@ void test_throwing_new_during_thread_creation() { #ifndef TEST_HAS_NO_EXCEPTIONS + std::vector v(10); throw_one = 0xFFF; { - std::thread t(f); + std::thread t(f, v); t.join(); } numAllocs = 0xFFF - throw_one; @@ -137,7 +139,7 @@ f_run = false; unsigned old_outstanding = outstanding_new; try { - std::thread t(f); + std::thread t(f, v); assert(i == numAllocs); // Only final iteration will not throw. t.join(); assert(f_run); @@ -156,7 +158,8 @@ { test_throwing_new_during_thread_creation(); { - std::thread t(f); + std::vector v(10); + std::thread t(f, v); t.join(); assert(f_run == true); }