[libcxx-commits] [libcxx] 2bbfa6b - [libc++] Fix test broken in C++03 due to requiring C++11 features from vector
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jun 3 09:59:54 PDT 2020
Author: Louis Dionne
Date: 2020-06-03T12:59:17-04:00
New Revision: 2bbfa6b02b3e5bb2458eae8bc8ef4e1517e994ce
URL: https://github.com/llvm/llvm-project/commit/2bbfa6b02b3e5bb2458eae8bc8ef4e1517e994ce
DIFF: https://github.com/llvm/llvm-project/commit/2bbfa6b02b3e5bb2458eae8bc8ef4e1517e994ce.diff
LOG: [libc++] Fix test broken in C++03 due to requiring C++11 features from vector
Added:
Modified:
libcxx/test/std/thread/thread.condition/thread.condition.condvarany/notify_all.pass.cpp
Removed:
################################################################################
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<std::thread> threads;
+ std::vector<std::thread> 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();
More information about the libcxx-commits
mailing list