c++: P0847R7 (deducing this) - xobj lambdas. [PR102609]
[official-gcc.git] / gcc / testsuite / g++.dg / cpp2a / class-deduction-alias8.C
blob9de0a7217a4289c1ed87be563f26a9bb33b00ab3
1 // PR c++/95486
2 // { dg-do compile { target c++20 } }
4 template <class T>
5 concept Int = __is_same (T, int);
7 template<class T, class U>
8 struct X { X(U) requires Int<U> {} };
10 template<class U>
11 X(U) -> X<char, U>;
13 template<class U>
14 using Y = X<void, U>;
16 Y y{1};
17 Y z{'a'}; // { dg-error "failed|no match" }