aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/class-deduction-alias8.C
blob: 9de0a7217a4289c1ed87be563f26a9bb33b00ab3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// PR c++/95486
// { dg-do compile { target c++20 } }

template <class T>
concept Int = __is_same (T, int);

template<class T, class U>
struct X { X(U) requires Int<U> {} };

template<class U>
X(U) -> X<char, U>;

template<class U>
using Y = X<void, U>;

Y y{1};
Y z{'a'}; // { dg-error "failed|no match" }