blob: 0afe1e6f2b6e5af288df372c5294c267bfd0f383 [file] [log] [blame]
Saar Raz67c608a2020-01-24 00:43:22 +02001// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify
Saar Razff1e0fc2020-01-15 02:48:42 +02002
3template<typename T, int a>
4concept C1 = true;
5
6template<C1 T>
7// expected-error@-1 {{'C1' requires more than 1 template argument; provide the remaining arguments explicitly to use it here}}
8using badA = T[10];
9
10template<C1<0> T>
11using A = T[10];
12
13using a = A<int>;
14
15namespace ns {
16 template<typename T, typename U, typename... X>
17 concept C2 = true;
18}
19
20template<ns::C2 T1, ::ns::C2 T2>
21// expected-error@-1 2{{'C2' requires more than 1 template argument; provide the remaining arguments explicitly to use it here}}
22requires (sizeof(T1) <= sizeof(T2))
23struct badB { };
24
25template<ns::C2<int> T1, ::ns::C2<char, T1> T2>
26 requires (sizeof(T1) <= sizeof(T2))
27struct B { };
28
29using b = B<int, int>;
30
31template<ns::C2... T1>
32// expected-error@-1 {{'C2' requires more than 1 template argument; provide the remaining arguments explicitly to use it here}}
33struct badC { };
34
35template<ns::C2<int>... T1>
36struct C { };
37
38using c1 = C<char, char, char>;
39using c2 = C<char, char, char, char>;