Debian Codegraph @

libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/robust_against_adl.pass.cpp

raw
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8
9 // UNSUPPORTED: no-threads
10 // UNSUPPORTED: c++03
11
12 // <thread>
13
14 // class thread
15
16 // template <class F, class ...Args> thread(F&& f, Args&&... args);
17
18 #include <thread>
19
20 #include "test_macros.h"
21
22 struct Incomplete;
23 template<class T> struct Holder { T t; };
24
25 void f(Holder<Incomplete> *) { }
26
27 int main(int, char **)
28 {
29 Holder<Incomplete> *p = nullptr;
30 std::thread t(f, p);
31 t.join();
32 return 0;
33 }