131
|
1 // { dg-do compile { target c++17 } }
|
|
2 // { dg-options "-fconcepts" }
|
111
|
3
|
|
4 template<typename T>
|
|
5 concept bool C1 = __is_same_as(T, int);
|
|
6
|
|
7 template<int N>
|
|
8 concept bool C2 = N == 0;
|
|
9
|
|
10 template<template<typename> class X>
|
|
11 concept bool C3 = true;
|
|
12
|
|
13 template<typename> struct Foo;
|
|
14
|
|
15 // Type template parameters
|
|
16 template<C1 T = int> struct S1 { };
|
|
17 template<C1 = int> struct S2;
|
|
18 template<C1 T> struct S2 { };
|
|
19
|
|
20 // Non-type template parameters
|
|
21 template<C2 N = 0> struct S3 { };
|
|
22 template<C2 = 0> struct S4;
|
|
23 template<C2 N> struct S4 { };
|
|
24
|
|
25 // Template template parameters
|
|
26 template<C3 X = Foo> struct S5 { };
|
|
27 template<C3 = Foo> struct S6;
|
|
28 template<C3 X> struct S6 { };
|
|
29
|
|
30 S1<> s1;
|
|
31 S2<> s2;
|
|
32 S3<> s3;
|
|
33 S4<> s4;
|
|
34 S5<> s5;
|
|
35 S6<> s6;
|