140950a44SArthur O'Dwyer //===----------------------------------------------------------------------===//
240950a44SArthur O'Dwyer //
340950a44SArthur O'Dwyer // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
440950a44SArthur O'Dwyer // See https://llvm.org/LICENSE.txt for license information.
540950a44SArthur O'Dwyer // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
640950a44SArthur O'Dwyer //
740950a44SArthur O'Dwyer //===----------------------------------------------------------------------===//
840950a44SArthur O'Dwyer 
9*a7f9895cSLouis Dionne // UNSUPPORTED: no-threads
1040950a44SArthur O'Dwyer // UNSUPPORTED: c++03
1140950a44SArthur O'Dwyer 
1240950a44SArthur O'Dwyer // <thread>
1340950a44SArthur O'Dwyer 
1440950a44SArthur O'Dwyer // class thread
1540950a44SArthur O'Dwyer 
1640950a44SArthur O'Dwyer // template <class F, class ...Args> thread(F&& f, Args&&... args);
1740950a44SArthur O'Dwyer 
1840950a44SArthur O'Dwyer #include <thread>
1940950a44SArthur O'Dwyer 
2040950a44SArthur O'Dwyer #include "test_macros.h"
2140950a44SArthur O'Dwyer 
2240950a44SArthur O'Dwyer struct Incomplete;
2340950a44SArthur O'Dwyer template<class T> struct Holder { T t; };
2440950a44SArthur O'Dwyer 
f(Holder<Incomplete> *)2540950a44SArthur O'Dwyer void f(Holder<Incomplete> *) { }
2640950a44SArthur O'Dwyer 
main(int,char **)2740950a44SArthur O'Dwyer int main(int, char **)
2840950a44SArthur O'Dwyer {
2940950a44SArthur O'Dwyer     Holder<Incomplete> *p = nullptr;
3040950a44SArthur O'Dwyer     std::thread t(f, p);
3140950a44SArthur O'Dwyer     t.join();
3240950a44SArthur O'Dwyer     return 0;
3340950a44SArthur O'Dwyer }
34