Brought thread variadic constructor up to current spec, which allows move-only functors and move-only arguments, but disallows functors with non-const lvalue reference parameters.
llvm-svn: 131413
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 f41a70b..e5568ba 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 @@
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 @@
assert(G::n_alive == 0);
assert(G::op_run);
}
+ {
+ std::thread t = std::thread(MoveOnly(), MoveOnly());
+ t.join();
+ }
#endif // _LIBCPP_HAS_NO_VARIADICS
}