Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/class-deduction-alias8.C

raw
1 // PR c++/95486
2 // { dg-do compile { target c++20 } }
3
4 template <class T>
5 concept Int = __is_same (T, int);
6
7 template<class T, class U>
8 struct X { X(U) requires Int<U> {} };
9
10 template<class U>
11 X(U) -> X<char, U>;
12
13 template<class U>
14 using Y = X<void, U>;
15
16 Y y{1};
17 Y z{'a'}; // { dg-error "failed|no match" }