aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/30_threads/thread/106695.cc
blob: 97e9e922d8e04895f86bd00a31cf84d8c77e67e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// { dg-do compile { target c++11 } }
// { dg-require-gthreads "" }

// PR libstdc++/106695
// Explicit copy constructor does not work for a parameter passed via std::async

#include <thread>

struct A {
  A() = default;
  explicit A(const A&) = default;
};

void func(const A&) { }

void
test_thread()
{
  std::thread t(func, A{});
  t.join();
}