[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / g++.dg / concepts / template-parm8.C
blob63a12c47f69634fed55f23ea77f611bf28e7a6aa
1 // { dg-options "-std=c++17 -fconcepts" }
3 template<typename T>
4   concept bool C() { return __is_class(T); }
6 template<typename T>
7   concept bool D() { return C<T>() and __is_empty(T); }
9 template<template<typename Q> requires C<Q>() class X>
10   struct S { };
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;
17 // Matching constraints are valid.
18 template<typename A> requires C<A>() struct T1 { };
19 S<T1> x2;
21 int main() { }