aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/concepts-alias.C
blob: b8089679772a9e24782160c8de59f7a141e459e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// { dg-do compile { target c++20 } }

template<typename T>
concept Class = __is_class(T);

template<typename T>
  requires Class<T>
using X = T*;

template<typename T>
using Y = X<T>;			// { dg-error "constraint" }

template<Class T> using Z = T*;

struct S { };

X<S> x1; // OK
X<int> x2; // { dg-error "template constraint failure" }
Y<int> y1; // { dg-message "" }
Z<S> z1; // ok