summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/concepts/variadic2.C
blob: 6c552771d59c646cc4fce56f363abc9bcc1c5bd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// { dg-options "-std=c++1z" }

template <class T> concept bool Copyable = requires (T t) { T(t); };
template <class T> concept bool Constructable = requires { T(); };
template <class T> concept bool Both = Copyable<T> && Constructable<T>;

template <Copyable... Ts> void f(Ts...) { }
template <Both... Ts> void f(Ts...) { }

int main()
{
  f(42);
}