1
//===----------------------------------------------------------------------===//
3
// The LLVM Compiler Infrastructure
5
// This file is dual licensed under the MIT and the University of Illinois Open
6
// Source Licenses. See LICENSE.TXT for details.
8
//===----------------------------------------------------------------------===//
14
// thread& operator=(thread&& t);
28
G() : alive_(1) {++n_alive;}
29
G(const G& g) : alive_(g.alive_) {++n_alive;}
30
~G() {alive_ = 0; --n_alive;}
39
void operator()(int i, double j)
50
bool G::op_run = false;
59
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
60
std::set_terminate(f1);
62
assert(G::n_alive == 0);
64
std::thread t0(G(), 5, 5.5);
65
std::thread::id id = t0.get_id();
68
assert(t1.get_id() == id);
69
assert(t0.get_id() == std::thread::id());
71
assert(G::n_alive == 0);
75
std::thread t0(G(), 5, 5.5);
76
std::thread::id id = t0.get_id();
81
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES