1 // PR c++/93907
2 // { dg-options -std=gnu++20 }
3 
4 // This testcase is a variadic version of concepts-using2.C; the only
5 // difference is that 'cd' and 'ce' are now variadic concepts.
6 
7 template <int a> struct c {
8   static constexpr int d = a;
9   typedef c e;
10 };
11 template <typename> struct f;
12 template <typename b> using g = typename f<b>::e;
13 struct b;
14 template <typename b> struct f { using e = b; };
15 template <typename ai> struct m { typedef g<ai> aj; };
16 template <typename b> struct n { typedef typename m<b>::aj e; };
17 template <typename b> using an = typename n<b>::e;
18 template <typename> constexpr bool ao = c<true>::d;
19 template <typename> constexpr bool i = c<1>::d;
20 template <typename> concept bb = i<b>;
21 #ifdef __SIZEOF_INT128__
22 using cc = __int128;
23 #else
24 using cc = long long;
25 #endif
26 template <typename...> concept cd = bb<cc>;
27 template <typename... bt> concept ce = requires { requires cd<bt...>; };
28 template <typename bt> concept h = ce<bt>;
29 template <typename bt> concept l = h<bt>;
30 template <typename> concept cl = ao<b>;
requires(b j)31 template <typename b> concept cp = requires(b j) {
32   requires h<an<decltype(j.begin())>>;
33 };
34 struct o {
operatoro35   template <cl b> requires cp<b> auto operator()(b) {}
36 };
37 template <typename b> using cm = decltype(o{}(b()));
38 template <typename bt> concept ct = l<bt>;
39 template <typename da> concept dd = ct<cm<da>>;
40 template <typename da> concept de = dd<da>;
41 struct {
42   template <de da, typename b> void operator()(da, b);
43 } di;
44 struct p {
45   void begin();
46 };
47 template <typename> using df = p;
q()48 template <int> void q() {
49   df<int> k;
50   int d;
51   di(k, d);
52 }
53