diff options
Diffstat (limited to 'libcxx/test/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp')
| -rw-r--r-- | libcxx/test/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libcxx/test/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp b/libcxx/test/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp index f41a70b9cfc..e5568bae29b 100644 --- a/libcxx/test/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp +++ b/libcxx/test/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp @@ -71,6 +71,22 @@ public: int G::n_alive = 0; bool G::op_run = false; +#ifndef _LIBCPP_HAS_NO_VARIADICS + +class MoveOnly +{ + MoveOnly(const MoveOnly&); +public: + MoveOnly() {} + MoveOnly(MoveOnly&&) {} + + void operator()(MoveOnly&&) + { + } +}; + +#endif + int main() { { @@ -126,5 +142,9 @@ int main() assert(G::n_alive == 0); assert(G::op_run); } + { + std::thread t = std::thread(MoveOnly(), MoveOnly()); + t.join(); + } #endif // _LIBCPP_HAS_NO_VARIADICS } |

