PR c++/86728 - C variadic generic lambda.
[official-gcc.git] / gcc / testsuite / g++.dg / concepts / pr65854.C
blob395fac4f5016d7c8fb729388ef373b4a6b43925a
1 // { dg-options "-std=c++17 -fconcepts" }
3 // Handle alias templates in type requirements.
5 template<typename T1, typename T2>
6 struct BTT { };
8 template<typename T>
9 struct BTT<T,T> { using type = int; };
11 template<typename T1, typename T2>
12 using Alias1 = typename BTT<T1, T2>::type;
14 template<typename T1, typename T2>
15 concept bool C()
17   return requires() { typename Alias1<T1, T2>; };
20 template<typename T1, typename T2>
21   requires C<T1, T2>()
22 int f();
24 auto i = f<char, int>(); // { dg-error "cannot call function" }