Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/concepts-template-parm1.C

raw
1 // { dg-do compile { target c++20 } }
2
3 template<typename T>
4 concept Int = __is_same_as(T, int);
5
6 // Type template parameters
7 template<Int T = int> struct S1 { };
8 template<Int = int> struct S2;
9 template<Int T> struct S2 { };
10
11 // Non-type template parameters
12 template<Int auto N = 0> struct S3 { };
13 template<Int auto = 0> struct S4;
14 template<Int auto N> struct S4 { };
15
16 S1<> s1;
17 S2<> s2;
18 S3<> s3;
19 S4<> s4;