From 2bbfa6b02b3e5bb2458eae8bc8ef4e1517e994ce Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Wed, 3 Jun 2020 12:58:50 -0400 Subject: [PATCH] [libc++] Fix test broken in C++03 due to requiring C++11 features from vector --- .../thread.condition.condvarany/notify_all.pass.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/notify_all.pass.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/notify_all.pass.cpp index 0e19e5925eeb..36428bc7fc50 100644 --- a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/notify_all.pass.cpp +++ b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/notify_all.pass.cpp @@ -44,9 +44,9 @@ void helper() { int main(int, char**) { notReady = threadCount; - std::vector threads; + std::vector threads(threadCount); for (unsigned i = 0; i < threadCount; i++) - threads.emplace_back(helper); + threads[i] = std::thread(helper); { while (notReady > 0) std::this_thread::yield();