brintos

brintos / llvm-project-archived public Read only

0
0
Text · 777 B · 9ba8d95 Raw
34 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9// UNSUPPORTED: no-threads10// UNSUPPORTED: c++0311 12// <thread>13 14// class thread15 16// template <class F, class ...Args> thread(F&& f, Args&&... args);17 18#include <thread>19 20#include "test_macros.h"21 22struct Incomplete;23template<class T> struct Holder { T t; };24 25void f(Holder<Incomplete> *) { }26 27int main(int, char **)28{29    Holder<Incomplete> *p = nullptr;30    std::thread t(f, p);31    t.join();32    return 0;33}34