Debian Codegraph @

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

raw
1 // { dg-do compile { target c++20 } }
2
3 template<typename T>
4 concept C = __is_class(T);
5
6 template<typename T>
7 concept D = C<T> and __is_empty(T);
8
9 template<template<typename Q> requires C<Q> class X>
10 struct S { };
11
12 // An unconstrained template can be used as an argument for any
13 // constrained template template parameter.
14 template<typename A> struct T0 { };
15 S<T0> x1;
16
17 // Matching constraints are valid.
18 template<typename A> requires C<A> struct T1 { };
19 S<T1> x2;
20
21 int main() { }