summaryrefslogtreecommitdiff
path: root/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-01-19 10:05:35 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-01-19 10:05:35 +0000
commit6012fe9abb1f01b1b5b4ca908464804c21ff8602 (patch)
treea5232179237d9aaa3a03f9c783974fc5f09716c6 /test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp
parent315d10f09ee888005b1da55e7bbb57d8a79b8447 (diff)
Notes
Diffstat (limited to 'test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp')
-rw-r--r--test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp b/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp
index d419b8cc855c..be3fc9c5d1eb 100644
--- a/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp
+++ b/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp
@@ -157,8 +157,11 @@ int main()
{
assert(G::n_alive == 0);
assert(!G::op_run);
- std::thread t((G()));
- t.join();
+ {
+ G g;
+ std::thread t(g);
+ t.join();
+ }
assert(G::n_alive == 0);
assert(G::op_run);
}
@@ -185,8 +188,11 @@ int main()
{
assert(G::n_alive == 0);
assert(!G::op_run);
- std::thread t(G(), 5, 5.5);
- t.join();
+ {
+ G g;
+ std::thread t(g, 5, 5.5);
+ t.join();
+ }
assert(G::n_alive == 0);
assert(G::op_run);
}