diff options
Diffstat (limited to 'libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/move.pass.cpp')
-rw-r--r-- | libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/move.pass.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/move.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/move.pass.cpp index 36e0fbd7b59..e88304ec8da 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/move.pass.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/move.pass.cpp @@ -55,16 +55,18 @@ int main() { #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { - assert(G::n_alive == 0); + G g; + assert(G::n_alive == 1); assert(!G::op_run); - std::thread t0(G(), 5, 5.5); + std::thread t0(g, 5, 5.5); std::thread::id id = t0.get_id(); std::thread t1 = std::move(t0); assert(t1.get_id() == id); assert(t0.get_id() == std::thread::id()); t1.join(); - assert(G::n_alive == 0); + assert(G::n_alive == 1); assert(G::op_run); } + assert(G::n_alive == 0); #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } |